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://gist.githubusercontent.com/hads0m/502cdb812caa25a32ddd994f6fbff0df/raw/e7ec8f706fc88623f0fb097b4d9704c4e0b4bd9a/install_docker_debian.bash | 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!
curl -fsSL get.docker.com | sh
Un saludo
Hello and thank you for your comment!
Unfortunately, the command you provided returns an error code when running it, even on a fresh Debian installation. This is the reason why I didn’t even mention it on my article. As you can see, this is the output:
[email protected]:~# curl -fsSL get.docker.com | sh
# Executing docker install script, commit: 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Sub-process /usr/bin/dpkg returned an error code (2)
Although the workaround for fixing this error message seems to be pretty easy, the main goal of our blog’s content is to provide reliable, trustworthy solutions.
Best regards.
hello!,I really like your writing very so much!
proportion we keep up a correspondence more about your post on AOL?
I require a specialist in this space to solve my problem.
May be that’s you! Looking forward to look you
Hello! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing many months of hard work due
to no data backup. Do you have any solutions to prevent
hackers?
A fascinating discussion is worth comment. I do believe that you should write more on this subject matter, it might not
be a taboo matter but usually folks don’t speak about these topics.
To the next! Kind regards!!
I was very happy to discover this web site. I want to to thank you for ones time for this fantastic read!!
I definitely liked every bit of it and i also have you book-marked to see new information on your blog.
A person necessarily help to make critically articles I’d state.
That is the first time I frequented your website page and up
to now? I amazed with the research you made to make
this actual post incredible. Fantastic activity!
What’s up, just wanted to say, I enjoyed this post.
It was inspiring. Keep on posting!
This site was… how do I say it? Relevant!!
Finally I have found something that helped me. Thanks a lot!
Outstanding post however , I was wondering if you could write a
litte more on this topic? I’d be very grateful if you could elaborate a little bit further.
Appreciate it!
I needed to thank you for this wonderful read!! I certainly enjoyed
every bit of it. I’ve got you book marked to check out new things you post…
Link exchange is nothing else except it is simply placing the other person’s website link
on your page at appropriate place and other person will also do similar in support
of you.
We absolutely love your blog and find almost all of your post’s
to be what precisely I’m looking for. Does one offer guest writers to write content available for you?
I wouldn’t mind creating a post or elaborating on a number of the subjects you write in relation to here.
Again, awesome web site!
This info is invaluable. Where can I find out more?
I am extremely impressed with your writing skills
as well as with the layout on your weblog. Is this a paid theme or did you customize it yourself?
Anyway keep up the excellent quality writing, it’s rare to see a great blog like this one nowadays.
We are a group of volunteers and starting a new scheme in our community.
Your web site offered us with valuable info to work on. You have done an impressive job and our whole community will be thankful
to you.
Pretty nice post. I simply stumbled upon your blog and wanted to say that I have truly enjoyed browsing your
weblog posts. After all I will be subscribing to your rss
feed and I hope you write once more soon!