Why apache container is not running?

Hi @player001 @juliettet @akshayyw
I’ve created a compose file to start two containers named web and DB
But apache container is not running!

It exited with status code 0 too.

Hi @Ashu27,

It looks to me like you may have an incorrect image name in your compose file. Try something more like this (…or you could also use any available apache tag):


Also, even though it is not expressly stated as part of this task, consider adding and overlay network to both of your services so that the two containers can speak to one another:

      image: php:rc-apache
            - overlay
      image: .....
            - overlay


I hope that this helps:-)

HI @juliettet,
With overlay too, I still need the ports right?

1 Like


  • Map php_apache container’s port 80 with host port 8083

  • &

  • Map mysql_apache container’s port 3306 with host port 3306

In order to view/access the containers, they need to be exposed.

I hope this helps:-)


  • a note on ports:

ports :

  1. Activates the container to listen for specified port(s) from the world outside of the docker(can be same host machine or a different machine) AND also accessible world inside docker.
  2. More than one port can be specified (that’s is why ports not port)

Hi @juliettet
Thanks for the help.
I’ve changed the image name of the apache container and everything worked.
I haven’t used overlay networks in compose file.
The task is successfull.


Hi @Ashu27,

Awesome! Great job!

1 Like