Simplify All the Things with Docker Compose
Vložit
- čas přidán 13. 08. 2020
- --
As you probably know by now, containers have revolutionized the software industry. But, once you have a container, then what? How do you run it? How do you help someone else run it? There are so many flags and options to remember, ports to configure, volume mappings to remember, and don't even get me started with networking containers together! While it's possible to do all of this through the command line, don't do it that way! With Docker Compose, you can create an easily shareable file that makes all of this a piece of cake. And once you fully adopt containers in your dev environment, it lets you setup your code repos to allow the simplest dev onboarding experience imaginable: 1) git clone; 2) docker-compose up; 3) write code.
In this talk, we'll talk about several tips to help make all of this a reality. We'll start with a few Docker Compose basics, but then quickly move into several advanced topics. We'll even talk about how to use the same Dockerfile for dev and prod (we've all been there by having two separate files)! As an added bonus, we'll look at how to use Docker Compose in our CI/CD pipelines to perform automated tests of the container images built earlier in the pipeline!
We'll have a few slides (because we have to explain a few things), lots of live demos (show it in action!), and maybe a few other surprises as well! Let's have some fun and help simplify all the things with Docker Compose!
Speaker: Michael Irwin, Virginia Tech
Twitter: @mikesir87 - Věda a technologie
a college class on containers? Hell yeah! Excellent talk. Thanks!
Thanks indeed, found your speech quite clear and illustrative
Thanks man. Million thanks
Congrats @Michael! Very easy to follow! I didn't know about stages and how useful they can be. I also liked the configuration about proxy & app. Thanks man!!!
You're quite welcome! I'm glad you found it useful!
Thanks Mike! Very helpful.
Great talk with good demo.. Thanks a lot.
super insightful!
Thank you for tutorial!
Thank you for all the resources!!! super helpful
Thanks for the comment and for tuning in! :)
Amazing tutorial. thanks for the effort
Love it. One of the best structured intermediate level talks I have ever seen. This definitely scratched my information itch.
any recommendayions for advanced talks?
Awesome talk
Thaats briliant. Thanks!!
Thank you Michael
It was clear and easy to understand everything you talked about.
But I taste a feel that there are deep things to learnn that you only mention in the video.
Perhaps ask you from your time prepare a video with those things.
Thank you a lot
Great talk! I'm newer to docker and understand the concept of mapping a local directory to a directory in the image so you use your local files to do development... In your docker compose file you have the named volume "nodemodules" that's mapped to the /node_modules directory in the image. What is that doing within your dev environment if it's not linked to the /node_modules in your local directory?
I know it's been a while, but this was a commonly used technique to help speed things up. The node_modules has a ton of files in it, so suffered from filesystem speed issues. By using a module to store the files, it kept all of the files in the Docker vm, skipping the sync and making things faster. The downside (which is fairly major) is that the files aren't synced back into the host, so IDEs can't intelligently help you with auto-imports, etc. But, with recent updates to the file syncing in Docker Desktop, I definitely wouldn't do this anymore. Great question and observation!
@@mikesir87 Thank you for taking the time to explain!
-1 for white theme on VS Code though (just kidding). Thanks a lot for this presentation.
Haha! I don't normally use a white theme, but white backgrounds tend to be easier to see in recordings/presentations. 😉
Moving the project I work on at work towards becoming dockerised, at the moment the devs and testers just run the code in the terminal using maven (Spring Boot 2 Java 11 app). There's about 6 services that need starting in a particular order so multiple commands required per service. Created the Dockerfiles for each of them already and now a single docker compose yaml to run them all in one command. Way easier and quicker to get them setup now, just need to get it approved by the tech lead 👌. I was wondering though, should the docker compose file have its own git repo?
wow!! can i get the source code for this architecture
just wanna try it out
Will you share the github for this presentation?
Absolutely! Here ya go: github.com/mikesir87/dockercon-2020-compose-talk
@@mikesir87 Thank you very much. I have issue on running this 'docker-compose -f docker-compose-test.yml -p tests up --exit-code-from tests', it prompted me to log in the docker hub, I did input my username and password, I still got the error "pull access denied for dc2020, repository does not exist or may require 'docker login': denied: requested access to the resource is denied", how to fix this?
@@pingyang8963 Ah! The images were only locally built and aren't on Docker Hub. If you run "docker build -t dc2020 ." to build the app image and then a "docker build -t dc2020-tests -f Dockerfile-e2e ." to build the test image, it should then work. I probably should have mentioned that somewhere. Sorry about that!
So.. was it a boy or a girl?
Great video but a bit too much personal information at the beginning, I think most of the audience just wants to hear about the topic and not you marital status and so on.
What the hell! 5 kids? Use some contraception dear.