← Back
Tech Hut February 6, 2024 16m

WATCH THIS to get started with Docker (easy mode)

Read full transcript 11 segments
  1. now if you've watched any of my videos now if you've watched any of my videos as of recent you probably know I am a as of recent you probably know I am a as of recent you probably know I am a huge fan of Docker about 90% of the huge fan of Docker about 90% of the huge fan of Docker about 90% of the applications running in my home lab are applications running in my home lab are applications running in my home lab are running through Docker containers running through Docker containers running through Docker containers whether that be my media server whether that be my media server whether that be my media server analytics tools web services or download analytics tools web services or download analytics tools web services or download clients now in this video we are going clients now in this video we are going clients now in this video we are going to go over the why the how and some of to go over the why the how and some of to go over the why the how and some of the basics that you need to know to get the basics that you need to know to get the basics that you need to know to get started using Docker and implementing it started using Docker and implementing it started using Docker and implementing it into your home network but first what is into your home network but first what is into your home network but first what is it now Docker is a platform that allows it now Docker is a platform that allows it now Docker is a platform that allows you to work with containers and you to work with containers and you to work with containers and containerized applications in the world containerized applications in the world containerized applications in the world of software and servers the container is of software and servers the container is of software and servers the container is an isolated environment that generally an isolated environment that generally an isolated environment that generally has a single primary application running has a single primary application running has a single primary application running inside of it containers allow developers inside of it containers allow developers inside of it containers allow developers and system administrators to create and and system administrators to create and and system administrators to create and deploy reproducible images that are deploy reproducible images that are deploy reproducible images that are similar to packages from a dros package similar to packages from a dros package similar to packages from a dros package manager however containers don't rely at manager however containers don't rely at manager however containers don't rely at all on libraries or dependencies from all on libraries or dependencies from all on libraries or dependencies from your host system they come with your host system they come with your host system they come with everything required to run a given an everything required to run a given an everything required to run a given an application in a known working application in a known working application in a known working configuration now in addition to the configuration now in addition to the configuration now in addition to the dependency benefit using Docker and dependency benefit using Docker and dependency benefit using Docker and containers makes it really simple to containers makes it really simple to containers makes it really simple to deploy and manage services since they're deploy and manage services since they're deploy and manage services since they're isolated from the host system whether isolated from the host system whether isolated from the host system whether that's bare metal or a virtual machine that's bare metal or a virtual machine that's bare metal or a virtual machine containers also make tearing down and containers also make tearing down and containers also make tearing down and cleaning up easy so they're a great way cleaning up easy so they're a great way cleaning up easy so they're a great way to experiment and play with various to experiment and play with various to experiment and play with various software and services so how do we get software and services so how do we get software and services so how do we get started using Docker now in general when started using Docker now in general when started using Docker now in general when I use Docker it's usually integrated I use Docker it's usually integrated I use Docker it's usually integrated into whatever operating system I tend to into whatever operating system I tend to into whatever operating system I tend to be using currently in my unrate instance

  2. be using currently in my unrate instance be using currently in my unrate instance Docker containers are installed through Docker containers are installed through Docker containers are installed through the application page and when you the application page and when you the application page and when you install it here you see a lot of install it here you see a lot of install it here you see a lot of variables that we're going to kind of variables that we're going to kind of variables that we're going to kind of touch on a little bit later but once touch on a little bit later but once touch on a little bit later but once something is deployed these applications something is deployed these applications something is deployed these applications are going to be managed through the are going to be managed through the are going to be managed through the docker page because they're really just docker page because they're really just docker page because they're really just Docker containers I also have a bare Docker containers I also have a bare Docker containers I also have a bare metal Ubuntu server that has Docker metal Ubuntu server that has Docker metal Ubuntu server that has Docker installed on it and installing Docker on installed on it and installing Docker on installed on it and installing Docker on auntu server is pretty easy you just auntu server is pretty easy you just auntu server is pretty easy you just have to install with app using the have to install with app using the have to install with app using the following commands first always update following commands first always update following commands first always update your system with pseudo app update and your system with pseudo app update and your system with pseudo app update and then we're going to do a pseudo app then we're going to do a pseudo app then we're going to do a pseudo app install docker.io if you want the most install docker.io if you want the most install docker.io if you want the most up-to-date version directly from Docker up-to-date version directly from Docker up-to-date version directly from Docker you can also install it from the you can also install it from the you can also install it from the official repositories that Docker official repositories that Docker official repositories that Docker provides for most major dros including provides for most major dros including provides for most major dros including auntu find the instructions in the auntu find the instructions in the auntu find the instructions in the docker's documentation that will be docker's documentation that will be docker's documentation that will be linked down below you can also check out linked down below you can also check out linked down below you can also check out the convenient script for one of the the convenient script for one of the the convenient script for one of the simplest and easiest ways to install it simplest and easiest ways to install it simplest and easiest ways to install it on your system and once that's done any on your system and once that's done any on your system and once that's done any future updates will be available through future updates will be available through future updates will be available through your normal apt update once it is your normal apt update once it is your normal apt update once it is installed on Ubuntu the docker systemd installed on Ubuntu the docker systemd installed on Ubuntu the docker systemd service will automatically be started service will automatically be started service will automatically be started and enabled so Docker will start and enabled so Docker will start and enabled so Docker will start automatically if the system is ever automatically if the system is ever automatically if the system is ever rebooted and you can check to see if rebooted and you can check to see if rebooted and you can check to see if it's running with the following command it's running with the following command it's running with the following command that is a pseudo system CTL status and that is a pseudo system CTL status and that is a pseudo system CTL status and Docker here we can see the servic is Docker here we can see the servic is Docker here we can see the servic is active and it's not throwing out any active and it's not throwing out any active and it's not throwing out any errors so now one step in the Linux post errors so now one step in the Linux post errors so now one step in the Linux post installation steps in the actual installation steps in the actual installation steps in the actual documentation is to manage Docker as a documentation is to manage Docker as a documentation is to manage Docker as a nonroot user for this you can add your nonroot user for this you can add your nonroot user for this you can add your user account to the docker group and

  3. user account to the docker group and user account to the docker group and this allows you to run commands without this allows you to run commands without this allows you to run commands without needing to use pseudo every single time needing to use pseudo every single time needing to use pseudo every single time however it is important to note that however it is important to note that however it is important to note that adding the user to the docker group adding the user to the docker group adding the user to the docker group grants them significant privileges as grants them significant privileges as grants them significant privileges as Docker allows direct access to the host Docker allows direct access to the host Docker allows direct access to the host system therefore exercise caution when system therefore exercise caution when system therefore exercise caution when granting Docker access to nonroot users granting Docker access to nonroot users granting Docker access to nonroot users as it can potentially lead to security as it can potentially lead to security as it can potentially lead to security vulnerabilities if not properly managed vulnerabilities if not properly managed vulnerabilities if not properly managed and monitored now if you want to do this and monitored now if you want to do this and monitored now if you want to do this run the following commands we do a run the following commands we do a run the following commands we do a pseudo group add Docker and there's a pseudo group add Docker and there's a pseudo group add Docker and there's a chance that you will already have that chance that you will already have that chance that you will already have that group and then from there we are going group and then from there we are going group and then from there we are going to do a pseudo user mod - A Docker and to do a pseudo user mod - A Docker and to do a pseudo user mod - A Docker and then the dollar sign all caps user this then the dollar sign all caps user this then the dollar sign all caps user this is a filler for your current user once is a filler for your current user once is a filler for your current user once you run that command it should look a you run that command it should look a you run that command it should look a little something like this and then if little something like this and then if little something like this and then if you log out and log in it will be you log out and log in it will be you log out and log in it will be activated or you could run the new grp activated or you could run the new grp activated or you could run the new grp Space Docker command to activate the Space Docker command to activate the Space Docker command to activate the group changes immedi immediately and now group changes immedi immediately and now group changes immedi immediately and now we won't have to use pseudo for Docker we won't have to use pseudo for Docker we won't have to use pseudo for Docker anymore after that a way to test that anymore after that a way to test that anymore after that a way to test that everything is working properly is to run everything is working properly is to run everything is working properly is to run the hello world container and we're the hello world container and we're the hello world container and we're going to do this with Docker run hello going to do this with Docker run hello going to do this with Docker run hello world docker's run command takes the world docker's run command takes the world docker's run command takes the name of a Docker image as its argument name of a Docker image as its argument name of a Docker image as its argument in this case Hello World if needed it in this case Hello World if needed it in this case Hello World if needed it downloads the image and then creates and downloads the image and then creates and downloads the image and then creates and runs a container based on that image runs a container based on that image runs a container based on that image downloading images is known as pulling downloading images is known as pulling downloading images is known as pulling and you can also pull an image manually and you can also pull an image manually and you can also pull an image manually using the pull command and this can be using the pull command and this can be using the pull command and this can be useful for getting a newer version of an useful for getting a newer version of an useful for getting a newer version of an image or initiating the download of a image or initiating the download of a image or initiating the download of a large image for later use for example large image for later use for example large image for later use for example this command pulls the latest version of

  4. this command pulls the latest version of this command pulls the latest version of an Ubuntu container Docker pole Ubuntu an Ubuntu container Docker pole Ubuntu an Ubuntu container Docker pole Ubuntu we can then run the Ubuntu container as we can then run the Ubuntu container as we can then run the Ubuntu container as an interactive session using the - it an interactive session using the - it an interactive session using the - it argument since the image is already argument since the image is already argument since the image is already pulled this container will basically pulled this container will basically pulled this container will basically start automatically this drops us into a start automatically this drops us into a start automatically this drops us into a bash shell running a fresh Ubuntu bash shell running a fresh Ubuntu bash shell running a fresh Ubuntu container and there's a full Linux file container and there's a full Linux file container and there's a full Linux file system and basic commands including apt system and basic commands including apt system and basic commands including apt are available so yes we are running are available so yes we are running are available so yes we are running Ubuntu within Ubuntu and to go ahead and Ubuntu within Ubuntu and to go ahead and Ubuntu within Ubuntu and to go ahead and exit this container all you need to do exit this container all you need to do exit this container all you need to do is hit contrl D now the command Docker is hit contrl D now the command Docker is hit contrl D now the command Docker PS gives us a view of the containers PS gives us a view of the containers PS gives us a view of the containers that Docker is currently managing by that Docker is currently managing by that Docker is currently managing by default it only shows running containers default it only shows running containers default it only shows running containers so the auntu container won't show up so the auntu container won't show up so the auntu container won't show up since it is now stopped but by adding since it is now stopped but by adding since it is now stopped but by adding the- a flag all of the containers even the- a flag all of the containers even the- a flag all of the containers even the stopped containers will be shown one the stopped containers will be shown one the stopped containers will be shown one thing to know about containers is that thing to know about containers is that thing to know about containers is that just creating a container doesn't take just creating a container doesn't take just creating a container doesn't take up any extra Space Docker works by up any extra Space Docker works by up any extra Space Docker works by creating layers on top of the pulled creating layers on top of the pulled creating layers on top of the pulled image as files are added or modified image as files are added or modified image as files are added or modified removing old containers is still a nice removing old containers is still a nice removing old containers is still a nice way to keep things nice and tidy and way to keep things nice and tidy and way to keep things nice and tidy and that can be done by running a Docker RM that can be done by running a Docker RM that can be done by running a Docker RM command with the container ID or the command with the container ID or the command with the container ID or the name of the container that we saw shown name of the container that we saw shown name of the container that we saw shown in Docker PS earlier now when we don't in Docker PS earlier now when we don't in Docker PS earlier now when we don't add a name variable when we fire up a add a name variable when we fire up a add a name variable when we fire up a container it will randomly generate one container it will randomly generate one container it will randomly generate one so next time I run the subut container so next time I run the subut container so next time I run the subut container I'll be sure to give it a creative name I'll be sure to give it a creative name I'll be sure to give it a creative name now when containers are removed any now when containers are removed any now when containers are removed any changes to the the container including changes to the the container including changes to the the container including store data will be lost in general store data will be lost in general store data will be lost in general containers are considered disposable and containers are considered disposable and containers are considered disposable and it is expected that they will be it is expected that they will be it is expected that they will be periodically replaced such as during

  5. periodically replaced such as during periodically replaced such as during updates so any important data that the updates so any important data that the updates so any important data that the container uses or generates should be container uses or generates should be container uses or generates should be stored separately Docker provides two stored separately Docker provides two stored separately Docker provides two main mechanisms for storing data main mechanisms for storing data main mechanisms for storing data persistently on the host system that is persistently on the host system that is persistently on the host system that is with volumes and bind mounts volumes with volumes and bind mounts volumes with volumes and bind mounts volumes provide a dedicated storage space that provide a dedicated storage space that provide a dedicated storage space that can be referenced by name for later use can be referenced by name for later use can be referenced by name for later use and then bind mounts on the other hand and then bind mounts on the other hand and then bind mounts on the other hand and are a way of giving the container and are a way of giving the container and are a way of giving the container access to a limited scope of the file access to a limited scope of the file access to a limited scope of the file system on the host bind mounts are what system on the host bind mounts are what system on the host bind mounts are what I end up using more than anything as my I end up using more than anything as my I end up using more than anything as my main use case back there is sharing main use case back there is sharing main use case back there is sharing media that I have on some of my network media that I have on some of my network media that I have on some of my network shares with various Docker containers shares with various Docker containers shares with various Docker containers for example many of my R applications for example many of my R applications for example many of my R applications have identical binds so that they work have identical binds so that they work have identical binds so that they work better together but first let's touch on better together but first let's touch on better together but first let's touch on volumes these can be added to a volumes these can be added to a volumes these can be added to a container by adding the-- volume flag container by adding the-- volume flag container by adding the-- volume flag or- V for short to a Docker run command or- V for short to a Docker run command or- V for short to a Docker run command for example we could do Docker run-it for example we could do Docker run-it for example we could do Docker run-it give it the Ubuntu name and then-- give it the Ubuntu name and then-- give it the Ubuntu name and then-- volume we're going to name this volume volume we're going to name this volume volume we're going to name this volume test and we're going to mount it to slmn test and we're going to mount it to slmn test and we're going to mount it to slmn within Ubuntu so then the volume name within Ubuntu so then the volume name within Ubuntu so then the volume name test will be created it will be mounted test will be created it will be mounted test will be created it will be mounted there and now that we are in the there and now that we are in the there and now that we are in the container shell we can create a file container shell we can create a file container shell we can create a file inside of that volume we're going to do inside of that volume we're going to do inside of that volume we're going to do this with an echo test into the proper this with an echo test into the proper this with an echo test into the proper location and then after we exit the location and then after we exit the location and then after we exit the container shell with contr d we can see container shell with contr d we can see container shell with contr d we can see the volume created by listing the the volume created by listing the the volume created by listing the volumes with dock volume LS by default volumes with dock volume LS by default volumes with dock volume LS by default Docker stores volumes on your host Docker stores volumes on your host Docker stores volumes on your host system Within These subd directories of system Within These subd directories of system Within These subd directories of VAR lib Docker volumes and we can access VAR lib Docker volumes and we can access VAR lib Docker volumes and we can access the contents like any other file but we

  6. the contents like any other file but we the contents like any other file but we will need to use pseudo in this case will need to use pseudo in this case will need to use pseudo in this case since the location is owned by the route since the location is owned by the route since the location is owned by the route to go ahead and make sure that it is to go ahead and make sure that it is to go ahead and make sure that it is there we can run a pseudo cat command there we can run a pseudo cat command there we can run a pseudo cat command into the proper directory SL testore into the proper directory SL testore into the proper directory SL testore data and test and then we could see it's data and test and then we could see it's data and test and then we could see it's there and we have access to it anytime there and we have access to it anytime there and we have access to it anytime we give the same volume name to a future we give the same volume name to a future we give the same volume name to a future Docker command that will use the same Docker command that will use the same Docker command that will use the same volume and the same data will be volume and the same data will be volume and the same data will be available also if we want to remove available also if we want to remove available also if we want to remove volumes it's a simple Docker volume volumes it's a simple Docker volume volumes it's a simple Docker volume remove test and in this case you can see remove test and in this case you can see remove test and in this case you can see my volume is still in use the volume my volume is still in use the volume my volume is still in use the volume associated with it is the auntu associated with it is the auntu associated with it is the auntu container so I'll need to go ahead and container so I'll need to go ahead and container so I'll need to go ahead and remove it and I could just do this with remove it and I could just do this with remove it and I could just do this with a Docker container remove command but I a Docker container remove command but I a Docker container remove command but I want to remove all my stopped containers want to remove all my stopped containers want to remove all my stopped containers in this instance so to do this I'm going in this instance so to do this I'm going in this instance so to do this I'm going to use a prune command running Docker to use a prune command running Docker to use a prune command running Docker container prune it will ask if I want to container prune it will ask if I want to container prune it will ask if I want to remove them and I will say yes in this remove them and I will say yes in this remove them and I will say yes in this case now do know this is a command that case now do know this is a command that case now do know this is a command that you want to be careful when you use the you want to be careful when you use the you want to be careful when you use the prune command also works with images prune command also works with images prune command also works with images volumes networks and well everything volumes networks and well everything volumes networks and well everything here's another example to see how bind here's another example to see how bind here's another example to see how bind Mounts work in this case we're going to Mounts work in this case we're going to Mounts work in this case we're going to mount the user home directory to the mount the user home directory to the mount the user home directory to the host system in the container the host system in the container the host system in the container the invocation is very similar with volumes invocation is very similar with volumes invocation is very similar with volumes we just substitute the host path in we just substitute the host path in we just substitute the host path in place with the volume name so in this place with the volume name so in this place with the volume name so in this case we would do Docker run it for case we would do Docker run it for case we would do Docker run it for interactive naming ittu and for the interactive naming ittu and for the interactive naming ittu and for the volume instead of giving just a generic volume instead of giving just a generic volume instead of giving just a generic volume name this is going to be pointed volume name this is going to be pointed volume name this is going to be pointed in our host system to the directory in our host system to the directory in our host system to the directory slome SL Brandon and we're going to be slome SL Brandon and we're going to be slome SL Brandon and we're going to be mounting this in SL Mount and it should

  7. mounting this in SL Mount and it should mounting this in SL Mount and it should show my host user folder and now that we show my host user folder and now that we show my host user folder and now that we launch the container we can see if that launch the container we can see if that launch the container we can see if that folder is available by running a LS SL folder is available by running a LS SL folder is available by running a LS SL MNT command now be careful with bind MNT command now be careful with bind MNT command now be careful with bind Mount since any changes the container Mount since any changes the container Mount since any changes the container makes will also be permanently made on makes will also be permanently made on makes will also be permanently made on your host system your host system your host system so generally it's a good idea to give so generally it's a good idea to give so generally it's a good idea to give containers access to the minimum containers access to the minimum containers access to the minimum necessary set of files and folders from necessary set of files and folders from necessary set of files and folders from the host so now we're going to go ahead the host so now we're going to go ahead the host so now we're going to go ahead and move on to the network side Docker and move on to the network side Docker and move on to the network side Docker provides a networking stack that can provides a networking stack that can provides a networking stack that can isolate containers from each other and isolate containers from each other and isolate containers from each other and the host system on the network level by the host system on the network level by the host system on the network level by default containers are added to a default containers are added to a default containers are added to a default Bridge Network where they can default Bridge Network where they can default Bridge Network where they can communicate with each other but can't communicate with each other but can't communicate with each other but can't reach the host system or any other reach the host system or any other reach the host system or any other devices on the host Network ports from devices on the host Network ports from devices on the host Network ports from specific containers can also be exposed specific containers can also be exposed specific containers can also be exposed to the outside side world if that port to the outside side world if that port to the outside side world if that port is open in the host systems firewall as is open in the host systems firewall as is open in the host systems firewall as well then it becomes a service on a well then it becomes a service on a well then it becomes a service on a host's network when using a Docker run a host's network when using a Docker run a host's network when using a Docker run a port can be exposed using the P option port can be exposed using the P option port can be exposed using the P option just like this let's run a Docker run- P just like this let's run a Docker run- P just like this let's run a Docker run- P we're going to run this in the port 8080 we're going to run this in the port 8080 we're going to run this in the port 8080 semicolon 80 and we're going to be semicolon 80 and we're going to be semicolon 80 and we're going to be testing this with engine X now the two testing this with engine X now the two testing this with engine X now the two numbers separated by the colon are the numbers separated by the colon are the numbers separated by the colon are the port numbers in this case the port 8080 port numbers in this case the port 8080 port numbers in this case the port 8080 on the host is mapped to the port 80 on the host is mapped to the port 80 on the host is mapped to the port 80 inside of the container so to check to inside of the container so to check to inside of the container so to check to see if it's working we can open our see if it's working we can open our see if it's working we can open our browser and enter Local Host Port 880 in browser and enter Local Host Port 880 in browser and enter Local Host Port 880 in the address bar or for a remote server the address bar or for a remote server the address bar or for a remote server after opening the firewall for engine X after opening the firewall for engine X after opening the firewall for engine X we replace Local Host with the service we replace Local Host with the service we replace Local Host with the service IP or the servers IP or domain if IP or the servers IP or domain if IP or the servers IP or domain if everything is working right the welcome

  8. everything is working right the welcome everything is working right the welcome page for engine X should load and it's page for engine X should load and it's page for engine X should load and it's also important to note whenever also important to note whenever also important to note whenever configuring a Docker container when you configuring a Docker container when you configuring a Docker container when you are changing the port in which a are changing the port in which a are changing the port in which a application or service is accessible on application or service is accessible on application or service is accessible on always change the first half and not the always change the first half and not the always change the first half and not the second half of the port because that can second half of the port because that can second half of the port because that can cause some breakage and of course like cause some breakage and of course like cause some breakage and of course like anything else this is just skimming the anything else this is just skimming the anything else this is just skimming the surface of all this so there'll be a surface of all this so there'll be a surface of all this so there'll be a link to a ton of documentation down link to a ton of documentation down link to a ton of documentation down below now docker's other primary Network below now docker's other primary Network below now docker's other primary Network driver is called host networking and driver is called host networking and driver is called host networking and this gives Containers Direct access to this gives Containers Direct access to this gives Containers Direct access to the network stack of the host this mode the network stack of the host this mode the network stack of the host this mode provides some benefits that are provides some benefits that are provides some benefits that are especially helpful when high performance especially helpful when high performance especially helpful when high performance or low-level networking operations are or low-level networking operations are or low-level networking operations are required this is also conceptually required this is also conceptually required this is also conceptually simpler but less flexible and simpler but less flexible and simpler but less flexible and potentially less secure since the potentially less secure since the potentially less secure since the container aren't isolated here's the container aren't isolated here's the container aren't isolated here's the previous example with some host previous example with some host previous example with some host networking we just run Docker Run net networking we just run Docker Run net networking we just run Docker Run net equals to host and engine X in this case equals to host and engine X in this case equals to host and engine X in this case engine X will bind directly to the port engine X will bind directly to the port engine X will bind directly to the port 80 on the host and should be reachable 80 on the host and should be reachable 80 on the host and should be reachable from a web browser just by typing Local from a web browser just by typing Local from a web browser just by typing Local Host on the host systems IP address now Host on the host systems IP address now Host on the host systems IP address now probably my favorite and that is Docker probably my favorite and that is Docker probably my favorite and that is Docker compose now when you go spin up a compose now when you go spin up a compose now when you go spin up a container you may see a normal Docker container you may see a normal Docker container you may see a normal Docker command like this in whatever command like this in whatever command like this in whatever application's documentation but if you application's documentation but if you application's documentation but if you see this instead this is to be used with see this instead this is to be used with see this instead this is to be used with Docker compose primarily a system of Docker compose primarily a system of Docker compose primarily a system of orchestrating groups of containers that orchestrating groups of containers that orchestrating groups of containers that work together for example a web work together for example a web work together for example a web application might include a database and application might include a database and application might include a database and a web server and each of those run in a web server and each of those run in a web server and each of those run in separate containers as part of a single separate containers as part of a single separate containers as part of a single Docker composed deployment that's

  9. Docker composed deployment that's Docker composed deployment that's managed as a single unit now personally managed as a single unit now personally managed as a single unit now personally I use it even with a single container I use it even with a single container I use it even with a single container because it's kind of easy to edit the because it's kind of easy to edit the because it's kind of easy to edit the command variables but that's besides the command variables but that's besides the command variables but that's besides the point when using Docker composed point when using Docker composed point when using Docker composed containers in the same deployment by containers in the same deployment by containers in the same deployment by default share a single Docker bridg mode default share a single Docker bridg mode default share a single Docker bridg mode Network that is separate from the usual Network that is separate from the usual Network that is separate from the usual default Network each container gets an default Network each container gets an default Network each container gets an IP address in a subnet unique to that IP address in a subnet unique to that IP address in a subnet unique to that Network and Docker also provides a DNS Network and Docker also provides a DNS Network and Docker also provides a DNS system so containers can resolve the IP system so containers can resolve the IP system so containers can resolve the IP address of other containers using their address of other containers using their address of other containers using their container name each group of containers container name each group of containers container name each group of containers managed by a compose is defined in a managed by a compose is defined in a managed by a compose is defined in a Docker - compos yaml file in the Docker - compos yaml file in the Docker - compos yaml file in the simplest form this file just specifies simplest form this file just specifies simplest form this file just specifies names for each container and which image names for each container and which image names for each container and which image they use networking volumes and many they use networking volumes and many they use networking volumes and many other options can be specified as well other options can be specified as well other options can be specified as well to control the behavior of the to control the behavior of the to control the behavior of the containers and how they work together containers and how they work together containers and how they work together many Docker composed files are available many Docker composed files are available many Docker composed files are available online and they are easy to get started online and they are easy to get started online and they are easy to get started with just download the docker-compose with just download the docker-compose with just download the docker-compose yaml file navigate to the folder where yaml file navigate to the folder where yaml file navigate to the folder where you save the Amo file and after any you save the Amo file and after any you save the Amo file and after any necessary edits run Docker compose up- D necessary edits run Docker compose up- D necessary edits run Docker compose up- D this single command will take care of this single command will take care of this single command will take care of setting up everything as defined in the setting up everything as defined in the setting up everything as defined in the yaml file and the- D flag tells Docker yaml file and the- D flag tells Docker yaml file and the- D flag tells Docker to run the deployment in the background to run the deployment in the background to run the deployment in the background and return control of the host shell and return control of the host shell and return control of the host shell logs for the containers won't be printed logs for the containers won't be printed logs for the containers won't be printed to the console in this case but can be to the console in this case but can be to the console in this case but can be accessed with Docker compose logs now to accessed with Docker compose logs now to accessed with Docker compose logs now to stop a Docker compose deployment later stop a Docker compose deployment later stop a Docker compose deployment later just run Docker compose down this will

  10. just run Docker compose down this will just run Docker compose down this will stop and remove all of the containers by stop and remove all of the containers by stop and remove all of the containers by default the data stored in the volumes default the data stored in the volumes default the data stored in the volumes is retained but you can also remove the is retained but you can also remove the is retained but you can also remove the volume data by adding the- V flag with volume data by adding the- V flag with volume data by adding the- V flag with Docker composed down- V now containers Docker composed down- V now containers Docker composed down- V now containers can only be removed when they are are can only be removed when they are are can only be removed when they are are stopped so it's sometimes necessary to stopped so it's sometimes necessary to stopped so it's sometimes necessary to stop a running container before removing stop a running container before removing stop a running container before removing it using the docker stop command Docker it using the docker stop command Docker it using the docker stop command Docker stop whatever the container name is if stop whatever the container name is if stop whatever the container name is if stop doesn't work killing the container stop doesn't work killing the container stop doesn't work killing the container may also sometimes be necessary and that may also sometimes be necessary and that may also sometimes be necessary and that can be done with Docker kill and again can be done with Docker kill and again can be done with Docker kill and again the container name this can be compared the container name this can be compared the container name this can be compared to closing out an application normally to closing out an application normally to closing out an application normally versus doing a end task within Windows versus doing a end task within Windows versus doing a end task within Windows Task Manager the basic method for Task Manager the basic method for Task Manager the basic method for updating a container is to pull a newer updating a container is to pull a newer updating a container is to pull a newer version of the container image remove version of the container image remove version of the container image remove the container and then start a new the container and then start a new the container and then start a new container using the new image version container using the new image version container using the new image version this is one reason that storing data this is one reason that storing data this is one reason that storing data inside of a volume or a bind is inside of a volume or a bind is inside of a volume or a bind is important as it's the only way the data important as it's the only way the data important as it's the only way the data can survive this process now something I can survive this process now something I can survive this process now something I use Watch Tower is a service or Docker use Watch Tower is a service or Docker use Watch Tower is a service or Docker container specifically for keeping container specifically for keeping container specifically for keeping containers up to date which itself runs containers up to date which itself runs containers up to date which itself runs in a container it detects whether if in a container it detects whether if in a container it detects whether if there is a new version available and there is a new version available and there is a new version available and replaces containers automatically with replaces containers automatically with replaces containers automatically with that new version using the these same that new version using the these same that new version using the these same settings that they're created with and settings that they're created with and settings that they're created with and it's what I have been using outside of it's what I have been using outside of it's what I have been using outside of unraid and it has been working great for unraid and it has been working great for unraid and it has been working great for my setup and if you're interested in my setup and if you're interested in my setup and if you're interested in learning more and it also has some learning more and it also has some learning more and it also has some options in configuration you could check options in configuration you could check options in configuration you could check out their official documentation and I out their official documentation and I out their official documentation and I will not if you're setting up like a will not if you're setting up like a will not if you're setting up like a production environment uh having

  11. production environment uh having production environment uh having containers automatically update might containers automatically update might containers automatically update might not be the best thing so do keep note of not be the best thing so do keep note of not be the best thing so do keep note of that so now you should have a nice Bas that so now you should have a nice Bas that so now you should have a nice Bas level knowledge of Docker necessary to level knowledge of Docker necessary to level knowledge of Docker necessary to start managing applications and servic start managing applications and servic start managing applications and servic is if you want to dive into even more is if you want to dive into even more is if you want to dive into even more there are a ton of great videos out there are a ton of great videos out there are a ton of great videos out there with a much longer way more there with a much longer way more there with a much longer way more information and I'll link to some of my information and I'll link to some of my information and I'll link to some of my favorites down below and with all that I favorites down below and with all that I favorites down below and with all that I I hope you have a good day if you do I hope you have a good day if you do I hope you have a good day if you do enjoy this type of video please let me enjoy this type of video please let me enjoy this type of video please let me know down below and if there's any tips know down below and if there's any tips know down below and if there's any tips tricks anything that I left out that you tricks anything that I left out that you tricks anything that I left out that you think should have been included please think should have been included please think should have been included please leave it down below in the comments and leave it down below in the comments and leave it down below in the comments and if you're watching learning Docker do go if you're watching learning Docker do go if you're watching learning Docker do go check out the comments so with that check out the comments so with that check out the comments so with that don't forget to subscribe for more don't forget to subscribe for more don't forget to subscribe for more content similar to this I hope you have content similar to this I hope you have content similar to this I hope you have a beautiful day and goodbye

Summary

This transcript explains the benefits and basics of using Docker for home lab applications. Key concepts include isolated environments, reproducible images, and dependency management, highlighting Docker's ability to simplify deployment and management. The practical takeaway is that Docker offers an efficient way to experiment with and run various software and services in a home network.

View original episode ↗