Docker-compose tutorial
If you have watched my video about "docker explained simply", we will now have a look at how to easily manage multiple Docker containers with just one simple configuration file. We will deploy a simple web server and database.
Docker-compose documentation: docs.docker.com/compose/
Install docker-compose: docs.docker.com/compose/install/
Follow me:
TWITTER: / christianlempa
INSTAGRAM: / christianlempa
DISCORD: / discord
GITHUB: github.com/christianlempa
PATREON: / christianlempa
MY EQUIPMENT: kit.co/christianlempa
Timestamps:
00:00 - Introduction
01:29 Get started with docker-compose.yaml
03:29 Versioning in docker-compose files
04:40 Deploy a simple webserver with docker-compose
11:30 Add more containers like database
17:00 Remove all docker containers from docker-compose file
18:03 Summary
----
All links with "*" are affiliate links.
Пікірлер: 102
Simple and Understandable docker-compose explanation. Excellent illustration !!. Thanks and gratitude to you !!
All your video tutorials are so good, you explain all the functions of each line or code, etc.Thank you.
Ive playing with docker for past 1 month. This video definitely had help me understand better what those lines means. Now i know how to create docker compose for docker container that the dev team doesn't provide one. Appreciate your video
This is the first time I am watching one of your videos. I loved how you explained the basics of docker compose in such a short amount of time. Thanks a lot for the amazing content!
@christianlempa
Жыл бұрын
Thank you so much! :)
This channel is a real discovery thank you for this amazing explanation.
I first used this method after version "3" yaml files were not accepted by portainer stacks without switching to swarm mode. Super useful additional information in this video.
This was a really great video explaining better than I've seen before. Thank you for sharing and keep sharing. Love your content!
@christianlempa
3 ай бұрын
Glad it was helpful!
Thank you very much! Just what I was looking for! Gracias!
@christianlempa
3 жыл бұрын
Thank you! I'm glad it was helpful to you.
Awesome videos! Thank you for all your content! Learning Docker with you has been lots of fun :) ...and I'm very jealous of the look of your desktop! That menu up top and that data breach background...love it!
@ilya0x
Жыл бұрын
Could you possibly do a video on how to setup windows to look like yours?🤓
@christianlempa
Жыл бұрын
Thank you so much!
@christianlempa
Жыл бұрын
I've done some videos, maybe take a look at the YT search :) but as I'm not using windows anymore, there is nothing new I can show :D I'm sorry
superb. Thank you for creating this tutorial.
@christianlempa
2 жыл бұрын
You are welcome 😊
need a petition to have this man replace Mr Tiebe
Thanks for your time.
@christianlempa
2 ай бұрын
Thanks for watching! :)
Man,you made it so simple!! Thanks
@christianlempa
2 жыл бұрын
Glad it helped!
@MR-vj8dn
3 ай бұрын
Would you care to explain what it was you found difficult to understand before?
Great video! this was really helpful!
@christianlempa
3 жыл бұрын
Glad it was helpful!
Very understandable explanation.
@christianlempa
2 жыл бұрын
Thx
Great video
Thanks! Great video!
@christianlempa
3 жыл бұрын
Glad you liked it!
Спасибо! Ты лучший!
I think the -d is to run the container in Detached mode, so that it runs in the background
@christianlempa
3 жыл бұрын
exactly! :)
really good video! thank you !
@christianlempa
2 жыл бұрын
Thanks! You're welcome
Great example
@christianlempa
2 жыл бұрын
Thanks!
Simple and understandable explanation, actually I was looking for an explanation of "links" in compose file. Could you please make another video on installing Magento? It would be really helpful for another developer also. Thanks.
@christianlempa
3 жыл бұрын
Thanks 😊 I will check when I could add this to a video, will take some time. Cheers
thankyou for such a nice and clear tutorial 👍👍 could you please make another video on deploying laravel or any other framework app using dockerfile.
@christianlempa
3 жыл бұрын
Thank you for the kind words 😀, more docker content is planned, thanks for the good suggestion!
Nice video, dude!
@christianlempa
2 жыл бұрын
Thanks!
I hope you post more videos about docker compose
@christianlempa
3 жыл бұрын
Yea, I've planned some more videos about it and also how to deploy them so stay tuned 😁👍
Good video.
Really 😃 great!
@christianlempa
Жыл бұрын
Thanks! 😃
Thank you, just beginner, I have more to learning ! :)
@christianlempa
2 жыл бұрын
Thanks mate! Keep it going :)
Great! can you share with us with your workspace theme?))
Nice tut, looking for a docker setup for PHP?
U the best broo
@christianlempa
2 жыл бұрын
Thank you :D
this guy knows his shiat. bravo !
Great
Hi, thanks for your videos, they are awesome. I have a question in general about docker-compose...if I want to spin up two different Nextcloud instances that have access to the same database application but different DB names, how would that look? Can I just add this to the compose file with different names? Thanks a lot!!
@christianlempa
2 жыл бұрын
Sure, that will work. You need to make sure that both nextcloud instances can connect to the same database and then configure separate databases in the config.
I was looking for some tips how to setup a new network with self-defined IP-addresses with docker compose.
Subscribed!!
@christianlempa
3 жыл бұрын
Thank you bro 😀
Hi, can I install docker on a subfolder? The main subdomain that my team is using has already installed with Wordpress. So, we want to install a subfolder inside that subdomain. The subfolder will then contains a PHP based application that uses a database. Where to create a database from there? Please let me know. I am new to this. I usually use just basic shared hosting.
Ik kijk dit voor besturingssystemen 2, Tiebe thanks voor niks zeker?
Could you go over the namespaces and cgroups ?
@christianlempa
3 жыл бұрын
that's a good suggestion to cover it on a future video! I will add this to my backlog 😉
What is the best way to install docker compose? I installed docker compose with using the docker repository (docker-compose-plugin), with that method I just get the Version v2.14.1. I searched in the docker documentation how to update/upgrade to a newer version, it just says to remove and install the docker-compose-plugin again. So how do I get ther Version 3? Is that just possible if you use another method of installing docker compose?
May you please elaborate more on docker compose like what is the use of below:- Version: '3.7' services: Jwt_API: build: Context: . dockerfile: Dockerfile environment: - Any name Image: jwt_API:latest Container_name: jwt_API Volumes: - ".:/qbc" Ports: -"anyport" Why we have used build, context, dockerfile, containername etc above.
@christianlempa
3 жыл бұрын
This is when you want to build your own docker images. I will make some tutorials on that in the future, but I don't know when.
pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.') During handling of the above exception, another exception occurred:
Very Nice , I am trying to create a container with OMV docker images. please suggest
@christianlempa
2 жыл бұрын
it's hard to find the issue here in the comment section, so why don't you come to our Discord Community, and post some details about your setup, maybe somebody can help you out ;)
@sudhadotsudha
2 жыл бұрын
@@christianlempa sure, do you have any forum or link to join the discord community
Hi Christian. Thanks for the awesome work you do! I followed many of your videos, and they helped me a lot. If you have time to answer my question, that would be great, because I can't find a solution for my problem in Docker-Swarm. I've installed "Ghost CMS" on Docker Swarm, along with NGINX-Proxy-Manager. Everything works as expected, except the Ghost CMS. When I deploy Ghost as a service with multiple instances, I can't login. I get to the login page, put the user & pw and hit enter, and I'l get thrown back to the login screen once again. This does not happen if I deploy Ghost with only 1 instance, either as a service or container. I have a NFS share for the Worker Nodes & the Master, so they can access all the same data of Ghost. Do you have any Idea for me Christian? ;-) Have a great day and continue your fantastic job here on YT. Thanks cheers...
@christianlempa
2 жыл бұрын
Thank you so much! ;) TBH, I haven't used Docker Swarm before so there is not much I can tell you unfortunately :(
What OS are you using? Can you make a video about your software setup?
@christianlempa
3 жыл бұрын
I'm using Windows 10 and yeah I probably will do a video about my complete setup, so thank's for this suggestion :)
Like the background theme,please share the music
Hi Chritsian how can we build a customized image using docker-compose? I have my dockerfile using docker-compose need to build image
@christianlempa
3 жыл бұрын
You need to specify a "build" attribute that points to the folder of where your Dockerfile and the source files are located
Do you need Docker-compose to run a docker container? I managed to get Portainer up and running without installing Docker-compose. Could that be something new? Also heard that Kubernetes now comes with a very minimal way of running Docker...
@christianlempa
2 жыл бұрын
You Don't need docker compose to run containers, it just simplify deploying multiple containers. Kubernetes has their own implementation of a container runtime, they used docker in the past.
@crazythings9330
2 жыл бұрын
@@christianlempa right now i'm working as Noc engineer , now i want to pursue devops tools ,can i learn docker and kubernates ,please suggest me tools to crack a job as devops engineer
Tabs or spaces , how many do you need per indentation?
@christianlempa
Жыл бұрын
I'm sure you can use whatever you want, you just need to stick with one scheme.
When you specify version "3" will it use 3.0 or latest "3.x" ?
@christianlempa
3 жыл бұрын
It will always use the latest version you have currently installed, you only need to specify 3.x for backwards compatibility.
hm what about docker-sync ?
which os did you use?
@christianlempa
Жыл бұрын
Recently, I switched from Windows to MacOS
[docker_entrypoint:crit] [pid 1] DOCKER: mkdir /data/etc: permission denied :D DOCKER ist so GEIL
Christian, I think your videos are great, and I enjoy your choice of topics. But why do you caption your channel, "Become an IT Professional?" I am a 71 year old retired lawyer, and I have no interest in becoming an IT Professional. However, I think your tutorials and coverage are great, and I will use many of the things you've taught me on my home network. Vielen Dank für die ausgezeichnete Informationen!
@christianlempa
3 жыл бұрын
Thank you so much for the kind words 🥰, this is a good question! That's why most of my content is geared towards common IT industry standards and also educates people in what they need in IT jobs. I also want to cover more IT career tips and certs. However, some of my viewers are not working in IT but use this for home lab and projects, which is totally fine and I also want to do more content for home labs as well. But I get it, the caption is something I probably will remove from my branding in the future. Vielen Dank für deine tollen Kommentar!
dont ask me to subscribe before I've watched your video.
The background music was an issue. I wouldn't recommend playing music during class while the professor is teaching.
@rahul_bali
3 жыл бұрын
classical very light music is fine, but not upbeat.
great video. the lighting in your face looks a bit off
@christianlempa
3 жыл бұрын
Thanks man 😊
i can hardly see it pls change the back ground
sorry, not works-> sudo: docker-compose: comand not found
@christianlempa
3 жыл бұрын
You may check out the docu about how to install docker-compose. Alternatively try out installing it via package management.
docker commands should not be run as root user!
MariaDB > MySQL