Featured image of post Install Docker on Debian 10 with no effort

Install Docker on Debian 10 with no effort

Learn to install the Docker container engine in Debian 10 systems by running a single command and save time and headaches.

Recently, I have been dealing with the deployment of multiple Debian servers which I had to configure in a pretty tailored way and also running Docker was a must. As I was performing the deployments by hand, after a few times finishing the Docker service installation I reached the conclusion that things needed to speed up.

That said, the quickest way that I found to do it was as easy as parsing every command pointed in installation process (which you can check in the official Docker documentation) directly into the machines through a snippet that I posted on Gist to make it available for anyone interested on it.

So yeah, as you can guess this is another one-liner shot focused to save some time. So if you are thinking of installing Docker in a Debian system, just try:

curl -s https://code.nullbyte.es/docker-apt | sudo bash

Of course, I encourage you to check the content of whatever you run before doing so, for many reasons. In this case, note that by default I am installing the latest available version of docker-ce and also docker-compose.

When the installation of Docker finishes, you can check if it is active on your machine by running:

sudo systemctl status docker

After that, you should see something like this:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-06-20 15:42:47 CEST; 33s ago
     Docs: https://docs.docker.com
 Main PID: 3769 (dockerd)
    Tasks: 12
   Memory: 47.9M
   CGroup: /system.slice/docker.service
           └─3769 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Note that there is also an official script from Docker to provide an automated installation located at this GitHub repository, so you just can follow any method you prefer, but keep in mind that, as the Docker team points, this method is only recommended in TESTING AND DEVELOPMENT ENVIRONMENTS.

And that’s all, now you can start containerizing whatever you want! I hope you find this as useful as I have. As always, any feedback is welcome.

Cheers!

Built with Hugo