If you are just starting to learn docker, one of the common questions that come to mind is what docker is and why one would need it.
In this pos...
For further actions, you may consider blocking this person and/or reporting abuse
xkcd.com/1988/
:) I love this.
One of the clearest and most concise "Docker 101" articles I've come across. Thanks!
Very good post!
Since you build all the services in the same docker-compose (so, in the same network), all services should be able to talk to each other, so you might not need the "link" in your docker-compose.yml.
I think. I may have to check that though ;)
For deploying php apps on a docker multi container, the process is not really that difficult. Once you have setup the environment, you have to add docker compose yml file to your project root.
Source: dockerize php application
Nice introduction. I missed two things that may not be clear for beginners.
Keep going! :)
Thank you for the comment. I'll update it shortly.
Hi Samuel! Thank you so much for your article! It worked here the only little container that didnt run was Mysql.. I kept getting this error:
W: Failed to fetch deb.debian.org/debian/dists/jessie... Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
So it wasn't working and I saw someone on github said to put this code before RUN apt-get update: RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
and I did and the rest of the stuff worked however I didnt get the MySQL instance running.. no idea why as I am super new to docker...
Could you help me?
Thanks!
Thanks for writing this article!
Do you have any advice regarding when to use docker-compose vs when to use a Dockerfile and programmatically install the individual services into one container?
Hi Tyler,
Thanks for reading.
A container is standardized unit of software which is lightweight, standalone while Docker Compose provides a way to orchestrate multiple containers (applications) that work together.
In a real-world, you may need more than one components (application) to run a software. For example: a software may need many components like database, webserver, cache server, and more to run. Each of these components is a unit.
When you have multiple components to deal with, you should use docker-compose to orchestrate them.
Don't package everything into a single container. A container is a unit of software.
"A container is a standardized unit of software."
That's a killer way to describe containers, thank you for your insight! I've been spending the day wrangling with docker-compose and was wondering if I was crazy for not just using a single Dockerfile.
This is great! I've been interested in exploring Docker for a while and found what you wrote to be a really accessible entry into it, thanks for this.
I'm happy you find it useful.
This really demystified docker for me. Thanks for that!
Thanks for reading. I'm glad you find it helpful.