Ask HN: What is the best source to learn Docker in 2023?
21–30 of 84 posts
Re: Ask HN: What is the best source to learn Docker in 2023?
#22If you just want to learn it for fun and home just install portainer and run pihole, you understand a lot more. Then learn to do it via command line. Else just go for kubernetes man. With Docker shim removed from kubernetes no one is using Docker professionally.
Not sure about this, Docker is still widely used in CI systems and local development in my experience.
It's also widely used in Opensource projects for "reproducible builds"
Re: Ask HN: What is the best source to learn Docker in 2023?
#23Once you have that under your belt it's not hard to work out how Docker itself works and how you can use it to fulfill the sort of CI/CD objectives you have outlined. Docker itself isn't important, the semantics of containerization are.
Something that Docker (and Docker like things) take massive advantage of are overly filesystems like AUFS and overlayfs, you would do good to understand these (atleast skin deep).
Finally networking becomes really important when you start playing with network namespaces, you should be somewhat familiar with atleast the Linux bridge infrastructure and how Linux routing works.
Good luck!
Re: Ask HN: What is the best source to learn Docker in 2023?
#24Ask it something like “Explain how to get started with Docker” and it will give you a bunch of steps in a reasonable order. Then ask it for details for each step, like:
“How do I install Docker on macOS?”
“Write a commented Dockerfile for an application written in $WHATEVER”
“Now write a commented Docker Compose file for this application and a Postgres database”
etc
Re: Ask HN: What is the best source to learn Docker in 2023?
#251. Rebuilding the entire container which often involves stopping and starting it, etc.
2. Manually running commands that copy the files into the container. This is irritating because if I forget which files I changed or forget to run the copy command I end up with a "half updated" container.
3. SSHing into the container. This is irritating because I have to modify the port layout and permissions of the container and later remember to "restore" them when I'm "done" making the container.
Thanks!
Re: Ask HN: What is the best source to learn Docker in 2023?
#26I use Docker from time to time, but one question I have is more about workflow. How are people editing files within existing containers without resorting to one of the following: 1. Rebuilding the entire container which often involves stopping and starting it, etc. 2. Manually running commands that copy the files into the container. This is irritating because if I forget which files I changed or forget to run the cop…
This works, however, only if you know beforehand which files you’re going to update frequently.
Re: Ask HN: What is the best source to learn Docker in 2023?
#27Re: Ask HN: What is the best source to learn Docker in 2023?
#28Re: Ask HN: What is the best source to learn Docker in 2023?
#29I use Docker from time to time, but one question I have is more about workflow. How are people editing files within existing containers without resorting to one of the following: 1. Rebuilding the entire container which often involves stopping and starting it, etc. 2. Manually running commands that copy the files into the container. This is irritating because if I forget which files I changed or forget to run the cop…
The data you work with should be stored externally (volume, database, accessed via API, …). You don‘t keep persistent state of your workload in the container.
Re: Ask HN: What is the best source to learn Docker in 2023?
#30I use Docker from time to time, but one question I have is more about workflow. How are people editing files within existing containers without resorting to one of the following: 1. Rebuilding the entire container which often involves stopping and starting it, etc. 2. Manually running commands that copy the files into the container. This is irritating because if I forget which files I changed or forget to run the cop…
Of course, this means that you'll not just stop, but completely destroy the old container and start a new one (created from the new image). You can get this to happen without service downtime by using the very same techniques that you'd use on any high availability / multi-server enviornment (rolling upgrades, canary deployments, etc.).
If you need to have some files that persist across these upgrades, then you use volumes and/or bind mounts. These allow you to have folders that persist independently of the container's lifecycle. They are typically used to store things like a sqlite database that the container uses, the set of configuration files that you can edit on a per-instance basis, etc.
Finally, there's a big case where you ignore all of the above: when you use containers as a development tool. In that case, particuarly for "interpreted" languages (python, php, ruby, etc.) it becomes extremely useful to bind-mount your pograms' sources inside a development container. You can then develop normally but also change the entire system where your app runs extremely easily. You can also keep different environments (language version, libraries, configuration of all those) for different projects without any change for conflicts between them, etc.