Docker is a technology that has revolutionised the world of development and system administration. This open source platform has become a standard for the creation, deployment and execution of applications, facilitating their operation in any environment in a fast, lightweight and consistent way.
Below, we will discuss the basics of Docker and how to install it. Then, we will review the essential commands that any system administrator should know.
What is Docker?
Docker makes it very easy to create, deploy and run applications in software containers, isolating applications and their dependencies using containers. In this way, it facilitates the execution of our applications from any system without spending a lot of time. This is because the boot of the container is immediate, as it does not use a complete operating system. Moreover, it is extremely clean. By installing all the dependencies inside the container, we don’t need to fill our computer with libraries and dependencies that later conflict with others that we already have installed or that may be installed in the future.
Another of its features is that it is managed through a very practical set of commands. Thanks to them, it is possible to manage and control applications and containers with great efficiency. Its greatest strength is the automatism of recurring tasks, which is done through these commands, and which facilitates the creation, execution, stopping and deletion of containers. Moreover, it is possible to manage multiple containers in a simple way, which is ideal in production or high-availability environments.
One main environment where the tool plays a key role is in continuous integration and delivery (CI/CD) pipelines, as it offers the following advantages:
- Portability. It is possible to run a container anywhere without the details of the operating system influencing the execution of the application.
- Isolation. Each container runs on its own, preventing application interference with other applications or the operating system.
- Fast execution. Containers boot instantly, without having to load a full operating system.
- Consistency across environments. Docker ensures that your application will run successfully in any environment (development, test, production).
- Efficiency. By running applications in containers, you reduce resource overhead because you don’t need full virtual machine instances.
Installing Docker on Linux
Next, we will proceed to install Docker to implement this tool.
- Update the system
sudo apt-get update
sudo apt-get upgrade
2. Install the necessary dependencies
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
3. Add the official Docker GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. Add the Docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
5. Update the repositories
sudo apt-get update
6. Install Docker
sudo apt-get install docker-ce
7. Verify the installation
sudo docker --version
At this point, Docker is ready to be used. Now, since Docker uses root privileges to run, we can add our user to the docker group so we don’t have to use sudo. To do this, we run the following command:
sudo usermod -aG docker $USER
Then, it would simply be necessary to test that Docker works correctly with:
docker run hello-world
Additionally, it is advisable to use Docker Desktop if you are new to this tool, as it will provide you with a graphical interface that makes it very easy to learn and use.

Most used Docker commands
Here we will see a list of the most important commands in Docker that will help us to start working with this technology.
- docker run: runs a container image, and you can specify which image you want to run as well as any arguments passed to the container.
- docker build: creates a container image from a Dockerfile. This is a text file containing instructions on how to build such an image.
- docker push: sends a container image to a container registry, which is a centralised repository where they can be stored and distributed.
- docker pull: downloads a container image from a container registry.
- docker stop: stops a running container.
- docker rm: removes a container that is not running.
- docker ps: displays a list of running containers.
- docker logs: shows the logs of a container.
- docker exec: executes a command inside a container.
- docker attach: used to attach to a running container and get an interactive shell console.
- docker images: shows all the images available on your local system, allowing you to see which versions can be used.
- docker-compose: this is a tool that allows you to manage multi-container applications with a single command, facilitating the orchestration of services in Docker.
Docker integration with CI/CD
Docker plays a fundamental role in CI/CD flows. It facilitates the creation of automated deployment pipelines, where applications can be consistently containerised and deployed in a secure and efficient manner. Docker also facilitates scalability, as multiple container instances can be created and run in parallel to handle larger or more complex workloads.
Docker in Production
Docker is not only useful in application development and testing. In addition, its deployment in production has become much more widespread due to its efficiency and reliability. You can run applications in isolation inside containers using Docker and that allows you to manage your applications and resources in a more efficient way. Additionally, production deployments of Docker are powered by tools such as Kubernetes, which enables large-scale container orchestration.
Conclusion
In this article, we have looked at what Docker is and what its benefits are. In addition, we’ve looked at a quick way to install it and reviewed its most commonly used commands. Docker is an extremely powerful technology, which is currently quite widespread, and which provides a series of very interesting functionalities: consistency between environments, scalability, isolation, portability, automation, repeatability, integration with CI/CD tools and fast and secure deployment to production.
We encourage you to work with this technology if you have never used it to keep your computer always clean and manage your applications quickly, easily and without using up much space on your disk.