I'm trying to deploy an web app in a VM instance at Google Compute Engine (GCP). I connect to instance via ssh and deployed docker-compose orchestrated app. Which runs two docker containers as below.

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               
6824c19fad9b        wordpress:latest    "docker-entrypoint.s…"   3 hours ago         Up 22 seconds>80/tcp   
3079c9872e3d        mysql:5.7           "docker-entrypoint.s…"   3 hours ago         Up 3 hours          3306/tcp

As per my previous experiences I mapped host instance's port 8065 to the wordpress container's port 80 (which works fine on my local machine and some other machines) So as you could see above docker has properly done the mapping I assume.

To test the setup from the instance, when I run curl http://localhost:8065
the terminal responds curl: (52) Empty reply from server

Since I can't make the internal mapping work, its useless to map from outside also. However I've made new ingress and egress firewall rules to enable tcp:8065 for this instance. However still no luck.

I'm aware that GCP recommends to use their Kubernates Engine to deploy containerized apps. However switching to that option is not the solution I'm expecting here. I just want to make sure what went wrong and how to make the current setup work in the same platform.

  • Empty reply from server seems to hint that the port is open, but the web server instance inside the container is not returning any useful data. It doesn't look like a networking problem. – Luca Gibelli May 5 '18 at 7:52
  • @LucaGibelli You are correct. This was an issue with the Wordpress and db docker setup and apache2 doesn't start on docker. To debug the issue I ran docker-compose up without -d so it reflects mosts of the issues. Thanks for pointing me to that direction. – inckka May 7 '18 at 6:53
  • @inckka Can you write down a proper answer explaining what it was failing? It can be extremely useful for future user coming across this question looking why their Wordpress and db docker setup is not working! – GalloCedrone May 14 '18 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.