Docker-compose tutorial

  Рет қаралды 66,806

Christian Lempa

Christian Lempa

Күн бұрын

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
@starryblue4
@starryblue4 2 жыл бұрын
All your video tutorials are so good, you explain all the functions of each line or code, etc.Thank you.
@mathewkargarzadeh3158
@mathewkargarzadeh3158 3 жыл бұрын
Simple and Understandable docker-compose explanation. Excellent illustration !!. Thanks and gratitude to you !!
@faizmk
@faizmk 2 жыл бұрын
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
@deepakjoyjose8189
@deepakjoyjose8189 Жыл бұрын
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
@christianlempa Жыл бұрын
Thank you so much! :)
@krebs4817
@krebs4817 3 жыл бұрын
need a petition to have this man replace Mr Tiebe
@mohbkhaled6051
@mohbkhaled6051 Жыл бұрын
This channel is a real discovery thank you for this amazing explanation.
@GorkemYildirim
@GorkemYildirim 3 жыл бұрын
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.
@robertjyllhed3245
@robertjyllhed3245 6 ай бұрын
This was a really great video explaining better than I've seen before. Thank you for sharing and keep sharing. Love your content!
@christianlempa
@christianlempa 6 ай бұрын
Glad it was helpful!
@JeanFrancoCaringi
@JeanFrancoCaringi 4 жыл бұрын
Thank you very much! Just what I was looking for! Gracias!
@christianlempa
@christianlempa 4 жыл бұрын
Thank you! I'm glad it was helpful to you.
@jaggyjut
@jaggyjut 2 жыл бұрын
superb. Thank you for creating this tutorial.
@christianlempa
@christianlempa 2 жыл бұрын
You are welcome 😊
@philmennenoh5946
@philmennenoh5946 4 ай бұрын
Thanks for your time.
@christianlempa
@christianlempa 4 ай бұрын
Thanks for watching! :)
@anoopramachandran5197
@anoopramachandran5197 3 жыл бұрын
Great video! this was really helpful!
@christianlempa
@christianlempa 3 жыл бұрын
Glad it was helpful!
@ilya0x
@ilya0x Жыл бұрын
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
@ilya0x Жыл бұрын
Could you possibly do a video on how to setup windows to look like yours?🤓
@christianlempa
@christianlempa Жыл бұрын
Thank you so much!
@christianlempa
@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
@kumaryendamuri1599
@kumaryendamuri1599 2 жыл бұрын
Very understandable explanation.
@christianlempa
@christianlempa 2 жыл бұрын
Thx
@vvagw5825
@vvagw5825 2 жыл бұрын
Спасибо! Ты лучший!
@jordancode
@jordancode Жыл бұрын
Great video
@jonysnm
@jonysnm 3 жыл бұрын
Thanks! Great video!
@christianlempa
@christianlempa 3 жыл бұрын
Glad you liked it!
@PROGamersf36
@PROGamersf36 2 жыл бұрын
really good video! thank you !
@christianlempa
@christianlempa 2 жыл бұрын
Thanks! You're welcome
@bikushah9958
@bikushah9958 2 жыл бұрын
Man,you made it so simple!! Thanks
@christianlempa
@christianlempa 2 жыл бұрын
Glad it helped!
@MR-vj8dn
@MR-vj8dn 6 ай бұрын
Would you care to explain what it was you found difficult to understand before?
@user-wr4yl7tx3w
@user-wr4yl7tx3w 2 жыл бұрын
Great example
@christianlempa
@christianlempa 2 жыл бұрын
Thanks!
@Ghaleon15
@Ghaleon15 2 жыл бұрын
Nice video, dude!
@christianlempa
@christianlempa 2 жыл бұрын
Thanks!
@autobahnmensch
@autobahnmensch Жыл бұрын
Really 😃 great!
@christianlempa
@christianlempa Жыл бұрын
Thanks! 😃
@mal-avcisi9783
@mal-avcisi9783 Жыл бұрын
this guy knows his shiat. bravo !
@aaronjameshorne
@aaronjameshorne 3 жыл бұрын
Good video.
@linonator
@linonator 3 жыл бұрын
I think the -d is to run the container in Detached mode, so that it runs in the background
@christianlempa
@christianlempa 3 жыл бұрын
exactly! :)
@ionution2009
@ionution2009 2 жыл бұрын
Thank you, just beginner, I have more to learning ! :)
@christianlempa
@christianlempa 2 жыл бұрын
Thanks mate! Keep it going :)
@rishiraj2548
@rishiraj2548 Жыл бұрын
Great
@sanderaerts1178
@sanderaerts1178 2 жыл бұрын
U the best broo
@christianlempa
@christianlempa 2 жыл бұрын
Thank you :D
@hangchen
@hangchen 3 жыл бұрын
Subscribed!!
@christianlempa
@christianlempa 3 жыл бұрын
Thank you bro 😀
@JeanFrancoCaringi
@JeanFrancoCaringi 4 жыл бұрын
I hope you post more videos about docker compose
@christianlempa
@christianlempa 4 жыл бұрын
Yea, I've planned some more videos about it and also how to deploy them so stay tuned 😁👍
@beesalniroula6146
@beesalniroula6146 3 жыл бұрын
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
@christianlempa 3 жыл бұрын
Thank you for the kind words 😀, more docker content is planned, thanks for the good suggestion!
@sagarnakrani2962
@sagarnakrani2962 3 жыл бұрын
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
@christianlempa 3 жыл бұрын
Thanks 😊 I will check when I could add this to a video, will take some time. Cheers
@haryan1627
@haryan1627 3 жыл бұрын
Great! can you share with us with your workspace theme?))
@kribo9604
@kribo9604 Жыл бұрын
Nice tut, looking for a docker setup for PHP?
@SebastianMBraun
@SebastianMBraun Жыл бұрын
I was looking for some tips how to setup a new network with self-defined IP-addresses with docker compose.
@mazwenb5783
@mazwenb5783 3 жыл бұрын
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.
@user-ui6qh5id2e
@user-ui6qh5id2e 2 жыл бұрын
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
@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.
@madhavimourya1157
@madhavimourya1157 2 жыл бұрын
Like the background theme,please share the music
@ohiasdxfcghbljokasdjhnfvaw4ehr
@ohiasdxfcghbljokasdjhnfvaw4ehr 3 жыл бұрын
pywintypes.error: (2, 'CreateFile', 'The system cannot find the file specified.') During handling of the above exception, another exception occurred:
@mattjacobwilliams1721
@mattjacobwilliams1721 3 жыл бұрын
Ik kijk dit voor besturingssystemen 2, Tiebe thanks voor niks zeker?
@richi_409
@richi_409 Жыл бұрын
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?
@wtc7862
@wtc7862 3 жыл бұрын
[docker_entrypoint:crit] [pid 1] DOCKER: mkdir /data/etc: permission denied :D DOCKER ist so GEIL
@krishnadasari9863
@krishnadasari9863 3 жыл бұрын
Hi Chritsian how can we build a customized image using docker-compose? I have my dockerfile using docker-compose need to build image
@christianlempa
@christianlempa 3 жыл бұрын
You need to specify a "build" attribute that points to the folder of where your Dockerfile and the source files are located
@GamerForeverChannel
@GamerForeverChannel Жыл бұрын
which os did you use?
@christianlempa
@christianlempa Жыл бұрын
Recently, I switched from Windows to MacOS
@ernesto_quintana
@ernesto_quintana 3 жыл бұрын
Could you go over the namespaces and cgroups ?
@christianlempa
@christianlempa 3 жыл бұрын
that's a good suggestion to cover it on a future video! I will add this to my backlog 😉
@ohiasdxfcghbljokasdjhnfvaw4ehr
@ohiasdxfcghbljokasdjhnfvaw4ehr 3 жыл бұрын
dont ask me to subscribe before I've watched your video.
@codewithvikasmishra
@codewithvikasmishra 3 жыл бұрын
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
@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.
@CristianMolina
@CristianMolina 3 жыл бұрын
When you specify version "3" will it use 3.0 or latest "3.x" ?
@christianlempa
@christianlempa 3 жыл бұрын
It will always use the latest version you have currently installed, you only need to specify 3.x for backwards compatibility.
@rudysal1429
@rudysal1429 Жыл бұрын
Tabs or spaces , how many do you need per indentation?
@christianlempa
@christianlempa Жыл бұрын
I'm sure you can use whatever you want, you just need to stick with one scheme.
@georgetarida5653
@georgetarida5653 3 жыл бұрын
What OS are you using? Can you make a video about your software setup?
@christianlempa
@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 :)
@TradersTradingEdge
@TradersTradingEdge 2 жыл бұрын
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
@christianlempa 2 жыл бұрын
Thank you so much! ;) TBH, I haven't used Docker Swarm before so there is not much I can tell you unfortunately :(
@sudhadotsudha
@sudhadotsudha 2 жыл бұрын
Very Nice , I am trying to create a container with OMV docker images. please suggest
@christianlempa
@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
@sudhadotsudha 2 жыл бұрын
@@christianlempa sure, do you have any forum or link to join the discord community
@SveinWisnaes
@SveinWisnaes 2 жыл бұрын
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
@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
@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
@trueskvoz
@trueskvoz 3 жыл бұрын
hm what about docker-sync ?
@ForrestRhoads
@ForrestRhoads 3 жыл бұрын
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
@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!
@richardfearing4751
@richardfearing4751 3 жыл бұрын
The background music was an issue. I wouldn't recommend playing music during class while the professor is teaching.
@rahul_bali
@rahul_bali 3 жыл бұрын
classical very light music is fine, but not upbeat.
@otegaawharitoma5340
@otegaawharitoma5340 Жыл бұрын
i can hardly see it pls change the back ground
@moin6747
@moin6747 3 жыл бұрын
great video. the lighting in your face looks a bit off
@christianlempa
@christianlempa 3 жыл бұрын
Thanks man 😊
@SebastianMBraun
@SebastianMBraun Жыл бұрын
MariaDB > MySQL
@luizgoss
@luizgoss 3 жыл бұрын
sorry, not works-> sudo: docker-compose: comand not found
@christianlempa
@christianlempa 3 жыл бұрын
You may check out the docu about how to install docker-compose. Alternatively try out installing it via package management.
@easyvideott7505
@easyvideott7505 Жыл бұрын
docker commands should not be run as root user!
Portainer Install Ubuntu tutorial - manage your docker containers
16:07
Christian Lempa
Рет қаралды 205 М.
Learning Docker // Getting started!
35:56
Christian Lempa
Рет қаралды 104 М.
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 26 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 65 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 37 МЛН
Ultimate Docker Compose Tutorial
1:03:14
TechWorld with Nana
Рет қаралды 148 М.
Backup in Linux Servers - Docker Volumes, and Databases
22:43
Christian Lempa
Рет қаралды 75 М.
Expose Your Docker Containers With Traefik
19:33
Techdox
Рет қаралды 12 М.
How to protect Linux from Hackers // My server security strategy!
30:39
Christian Lempa
Рет қаралды 216 М.
How to create a great dev environment with Docker
29:55
Patrick Loeber
Рет қаралды 254 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 416 М.
Docker explained simply
18:47
Christian Lempa
Рет қаралды 33 М.
Docker Compose Tutorial
33:02
Programming with Mosh
Рет қаралды 435 М.
What is Docker Compose? Multiple Containers & Docker Networking
14:18
Docker Crash Course for Absolute Beginners [NEW]
1:07:39
TechWorld with Nana
Рет қаралды 1,5 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 26 МЛН