What is this Docker course about?
As its name suggests, it is a full Docker course, which means that we will start from the most basic, which is the theory to have a good foundation, and then we will continue with practice, more advanced concepts and examples.
Once you finish it, you will be able to fully master Docker and add it to your resume without fear, because you will be able to face any task or project that includes it with total confidence.
Likewise, it is a fully free and online course, there are no paid sections or exercises, all the content is at your disposal so that you can consult it whenever and wherever you want.
Finally, I would like to comment that in this course we will not mix other concepts that are usually found together with Docker, such as Kubernetes. I think that is counterproductive to learning and, as the Spanish saying goes, whoever tries too much, does little.
Why should I choose this course?
Similar to other content you can find on this website, this course is actually my personal notes written a little better than I would if they were just for me.
With this I want to tell you that, like you, before starting with these Docker notes I didn’t have much idea about the subject and I have managed to master it fully from start with practical and real examples.
Below I will list some reasons why you should choose this Docker course:
- Fully online course.
- Totally free, without tricks or paid sections, all the information is at your disposal so you can consult it whenever you want.
- Theory included in the first topic. I know it’s a bit boring, but it is necessary to have certain concepts clear before moving on to practice.
- Real and practical examples, we will use a .NET example project with three modules, an APP with .NET MVC, an API made with .NET and a database for information persistence.
- Starting from start for beginners. You don’t need to have any previous knowledge of Docker, although it is recommended that you have some basic knowledge of the Linux terminal and some software architecture.
- Adequate length, it is not an excessively long course like, for example, the SEO course we saw. We only have five topics and, if we count this introduction and the summary post on commands and files, seven topics.
Docker course content and index
Finally, we are going to see the topics of the Docker course and a brief summary of each of them.
Docker theory with the most important concepts
Among others, some of the concepts that we will see in the Docker theory throughout the course are:
- What is Docker and what are its advantages. We will see that it is a virtualization system to deploy and run applications with multiple advantages.
- Differences between images, containers and virtual machines.
- What are container sets and what can we define and configure within them.
- Differences between Dockerfile vs docker-compose.yml files.
- How to install and test Docker on your local computer, essential for testing and performing the practices.
- Summary of the real practical example that we are going to use throughout the tutorials.
Docker in practice through commands for images and containers
Then we will begin with the practice, specifically this chapter of the course focuses on the practice of Docker through commands:
- Commands to download and manage images. Although we will not yet go into how to create custom images, we will see how to download and delete images and we will see what tags are and why they are so important.
- Commands to manage containers. Some of the sections included in this point are the creation, elimination and execution of containers.
- What are the ports in containers and how to set them when running them.
- Configuration variables, interactive mode and logs to debug errors.
- Volumes and persistent storage in Docker, we will see that by default the storage of a container is volatile and that we can solve this problem with volumes.
- What is the run command and what is it for? This command is a bit special since it is actually a set of commands seen previously.
Obviously we will see all these points in a practical way by configuring and running a SQL Server container.
Practical Dockerfile tutorial to create images
The previous commands will help us understand how the internal machinery of Docker works, however, commands are not usually used much, what is really used are files.
The first file we will see in the course is the Dockerfile which is used to create custom images that we will then deploy in containers:
- Basic structure of the Dockerfile file and the most important lines. Among other things, we will see what FROM, WORKDIR, COPY, RUN, ARG, ENV, EXPOSE, USER and CMD are and what they are used for.
- Basic and practical example of a Dockerfile, where we will create a small container with a web server and an HTML page. We will configure and check that this website is accessible from our computer.
- Security and users, we will see how to improve the security of containers through the creation and use of specific users instead of root.
- What .dockerignore is and what it is used for, through a practical example we will see what use this file has when it comes to optimizing images and containers.
- Practical and real example of a Dockerfile, at this point we will begin to work on our example project where we will put a full .NET project with its APP, API and database in containers.
- How to optimize images and containers, we will see that there are several ways to reduce image creation time and container size.
- How the Docker cache and layers work, my favorite part of the course, is here where we begin to see slightly more advanced concepts that will allow you to learn the inner workings of Docker and take advantage of it to optimize, again, the times and sizes of images and containers.
- What are multi-stage Dockerfiles with a practical example, again, another advanced concept that we will explain and see through a real example using our .NET project as a reference.
Practical docker-compose.yml tutorial for running containers
The second file we will see is docker-compose.yml to configure the deployment and execution of a set of containers:
- What is the docker-compose.yml file for? We will explain in theory what this file provides us when running and deploying multiple images and containers.
- Real and practical example of docker-compose.yml. We will configure a part of our .NET project through this file and then deploy them through the docker compose commands.
- Difference between services build vs services image. In this part, we will configure the database container that, as we will see, uses services image to download the image instead of services build to create it from the Dockerfile file.
- Creating volumes for persistent storage. In the case of the database, it will be necessary to indicate through the docker-compose.yml file that we have a volume and map it to achieve data persistence.
- Networks, ports and configuration variables in docker-compose.yml. We will see some concepts in practice that will allow us to define a good architecture for our set of containers.
- Dependencies and healthchecks in Docker, as a last step we will see how to orchestrate the start of containers through the “depends_on” and “healthcheck” lines in a practical way.
Deploying applications in the cloud and publishing images
As a last step in the practical Docker course we will see how to deploy applications and publish images so that users can access our application and developers can download our images:
- How to publish images on Docker Hub, we will see that, as with Git and Github, there are platforms to upload images and share them with other users.
- Share images privately, if you do not want to use an external platform in the cloud there are also alternatives to publish images privately.
- Ways and services to deploy Docker applications, we will analyze the different alternatives we have to publish our applications in the cloud.
- Deploying docker-compose.yml in Azure AppServices, through a real example we will be able to have our full application published in Azure through two different methods.
- Deploying docker-compose.yml in an Azure virtual machine, we will repeat the previous deployment but this time using a virtual machine hosted in Azure.
Course summary with the most important commands and lines
This topic is actually a compilation and summary of all the chapters seen throughout the course that you can use when you are working as a cheatsheet with the most important Docker commands and lines:
- Image commands.
- Commands for containers.
- Lines from the Dockerfile file.
- Commands and lines from the docker-compose.yml file.
- Other useful Docker commands.




