It exited with status code 0 too.
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
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:
services: web: image: php:rc-apache ....... ......... ...etc... networks: - overlay db: image: ..... ....... ......... ...etc... networks: - overlay networks: overlay:
I hope that this helps:-)
With overlay too, I still need the ports right?
host port 8083
host port 3306
In order to view/access the containers, they need to be exposed.
I hope this helps:-)
- a note on ports:
- 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.
- More than one port can be specified (that’s is why ports not port)
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.
Awesome! Great job!