Installing Docker on Linux Mint

Ok, so first things first. This is not a ground shaking post of revelation, and ultimately all the information you need can be found directly from Docker, but like all good posts this is intended to address any confusion or ambiguity you may find when installing Docker on Linux Mint and join all the dots for you.

A web search will almost certainly point you to lots of similar posts, mostly (if not) all of which start instructing you to add unofficial or unrecognized sources, keys etc. Therefore my intention with this post is not to replace official documentation, but to make the process as simple as possible, whilst still pointing to all the official documentation so that you can be confident you are not breaking security or other such things!

You can head over to the following Docker page Get Docker CE for Ubuntu for the initial setup and updates, but for simplicity, you can follow along below.

First run the script below in order to update your local files from configured repositories, install required packages, and add the official Docker GPG key.

# Ensure your repositories are up to date
sudo apt-get update

# Install required packages
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \

#Add Docker’s official GPG key:
$ curl -fsSL | sudo apt-key add -

#Check the GPG fingerprint successfully added (should see output from this command)
sudo apt-key fingerprint 0EBFCD88

Once this has been done, next up is perhaps the most important step (in terms of potential problems) -and that is adding the correct repository for your version of Linux Mint. The issue you face is that Linux Mint uses its own release codenames and so the default script (provided by Docker) picks this up rather than the (required) Ubuntu release -its the $(lsb_release -cs) piece of code in their script. Instead, you will need to find out your Mint release name and replace this with the correct Ubuntu package base.

Find out your Linux Mint short codename by running the following:

lsb_release -cs

In my case I find that I am running Linux Mint Serena. Next, you need to find out the short codename of the Ubuntu base build that your edition of Mint is derived from. To do this, visit the Linux Mint Releases page.

From this page, I can see that Serena uses the Xenial package base (as below):

So now all we need to do is add the right repository for the right package base (note I have added xenial to the script below). In your case, you may be using a new or older edition of Mint, so simply replace the word “xenial” in the script with the correct package base relevant to the version of Mint you are using.

#Add the Docker repository for the Xenial build
sudo add-apt-repository \
   "deb [arch=amd64] \
   xenial \

Once this is completed you then need to perform the Docker post-installation tasks which you can find here. These tasks are really there to prevent you having to keep running all Docker commands using the privileged sudo command. For instance, without going any further you *could* already now run the following command to list all current downloaded docker images (there should be none).

#list docker images (using privelaged mode)
sudo docker image ls

But we can avoid having to keep specifying sudo by running the following:

# Create a new docker group
sudo groupadd docker

# Add your user to the docker group.
# This script assumes that your current user
# is the one you want to be a docker admin
sudo usermod -aG docker $USER

It is now important that you log out of your session and back in, in order to pick up the new security context in your session, otherwise you may be greeted with the following text when attempting to run your docker command without sudo:

retracement@mylinuxhost ~ $ docker images
Got permission denied while trying to connect to the
Docker daemon socket at unix:///var/run/docker.sock:
Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/images/json:
dial unix /var/run/docker.sock: connect: permission denied

So if you have followed the instructions correctly, you should be able to list docker images (or any other docker command) without requiring sudo as follows:

#list docker images (non-privelaged mode)
docker image ls

And that’s it. Docker is now ready for you to run containers on your shiny Linux Mint desktop.

Posted in Docker, Linux | Tagged | Leave a comment

4 days of Dockercon – Day 4

After doing some more work in the evening for Microsoft and watching my Football match, I didn’t get to sleep until midnight, so I woke with my usual conference groggy feeling. At my age, I really need more hours in bed! Thankfully I had done most of my packing the night before so didn’t have an awful lot to do. However given the fact that I had skipped dinner/ supper the night before I was determined to grab a big breakfast. I’d skipped my evening meal since I really couldn’t be bothered to wander down to the Shopping Mall and waste 40 minutes on a round trip in doing so, nor did I fancy a meal in the hotel restaurant wasting 2 hours of messing around.

This morning I was out of my room by 8 am. and promptly checked out, booked my transit back to the airport and checked my luggage into the Conference drop off point and headed to the post-conference Summits. I had somehow managed to register for two (the Moby Project Summit and Enterprise Summit) and whilst I suspected that the Moby Project would hold slightly more interest for me, I felt that it probably would hold less business value than the Enterprise option. So I deregistered myself from Moby, and went to get myself a freshly-born bouncing plate of bacon, eggs, beans, and… cheese! (yes these Danish folks are nut-cases!!!).

The Enterprise Summit kicked off talking even more about the MTA program and perhaps labored a little too long on its overview (especially since we had witnessed much of this material during the conference and keynotes). A few demos later and I am impressed that MTA and Docker Enterprise are a very good business proposition for most (if not all) businesses, though I really must try these things out myself on some problematic apps. You know the saying that  “if it sounds too good to be true….”? That’s partially how I feel at the moment, and I would rather hear about the serious problems encountered and failures experienced – that (I believe) would be more useful for us to understand the limitations of this service. The Enterprise Summit in truth was an extended series of sessions and regurgitated material and took us up to lunchtime (only 3 hours after breakfast – seriously guys?!) but I decided to take the opportunity now, given the proximity of the hotel to anything else and also taking into account my arranged departure time to the airport (5.30 pm.). The afternoon section of the “Enterprise Summit” consisted of completing the lab exercises, so I decided to finish lunch early and head over to my favorite spot.

Unfortunately for me, by 3pm. I was kicked out of the Conference center since Dockercon was “officially over”, and therefore had no option but to head back to the hotel and continue the labs from the bar area where I managed to do some cool stuff in swarm (playing around with node failures, container scaling and failed upgrades/ rollbacks).

This. Is. The. Future. Folks. (And the future is now…).

Thankfully I’d just finished up and grabbed my ride to the airport and 15 minutes later hit checkin, security, etc. After refuelling on airport pizza I decide to crack open the labs for one last time and 2 hours later remember it is probably a good time to hit the button on this blog post :).

All in all, a very productive 1st Dockercon and I have got much more return on investment than I could ever dream from certain other conferences (which shan’t be named!). I did miss bumping into many of my friends and familiar faces during this conference and certainly found the (presumably) Danes very reserved and hard to have a conversation with at the dinner tables -so after several abortive attempts to get them speaking I ultimately gave up. I already have another (bucket list) conference firmly on my watch list for next year, but really hope I can add Dockercon US/EU also into my budget.

Other posts in this series
4 days of Dockercon – Day 3
4 days of Dockercon – Day 2
4 days of Dockercon – Day 1
4 days of Dockercon – Day 0

Posted in Community, Events | Tagged | Leave a comment

4 days of Dockercon – Day 3

The second and final day of general sessions arrives and I manage to leave my room with a little more time to spare than yesterday. Again, I grab a bite to eat in the exhibitor room and then find myself a good seat for the keynote day 2. This time it was lead by Scott Johnson (COO of Docker) and focused again on Docker Enterprise Edition but with a strong focus on the MTA program and migrating legacy apps to Docker. The atmosphere was slightly more subdued today -probably because people were nursing hangovers from last nights party, but I was intrigued by a few things. For instance, when they talked about migrating a legacy .NET app and modernizing it to Docker, it wasn’t really clear to me whether doing so was also irradicating dependencies on older .NET frameworks.

During the break between the keynote and first session, I decided to pick up where I left off with the Docker Labs and managed to go through the Docker on Linux 101 and Docker on Windows 101 excercises. Apart from a few minor typos in the demo code, these worked really well, although the Windows environment was noticeably slower than Linux which was a little frustrating. I decided to skip the first session so I could work my way through more lab material which took me up to lunchtime.

For my first session of the day I decided to attend “Docker EE Deep Dive” by Patrick Devine, which I found quite interesting but felt that it didn’t quite go as “deep” as I’d like to have seen.  That said, I am convinced that I need to spend more time familiarizing myself with Enterprise Edition if I am ever going to make a success of my “microservices journey”.

After lunch, I decided to speak with a few more storage solution vendors and deliberated whether to go to my second session of the day. None of the sessions that were on offer grabbed me enough, so I decided to extend my adventures with the lab environment and worked through a few more scenarios. So by the time my next session arrived, I was really looking forward to it and chose “Becoming the Docker Champion: Bringing Docker Back to Work” by Jim Armstrong. To be honest, I was more than a little disappointed that the content was not technical and focused more on the “politics” of the workplace and your company’s staff motivations for adopting of Docker (or not). For me, this was largely a waste of my time even though Jim presented the session well, the session needed really to live in a management track (had one existed). During the next long break, I headed back to the Lab area and continued to work through the material. After the last session, I deliberated whether I should attend the last session of the day (of which a Serverless panel was quite appealing), and ultimately came to the conclusion that it was probably more worthwhile if I continued working my way through the labs.

That was really the end of (a slightly disappointing) day, but at least I got some good value from the Labs. In the evening I struggled to remote onto my machine back home so I could watch the Chelsea v Roma game and failed. Therefore I had to resort to finding a hooky stream which kept cutting out every 5-10 minutes. Even though Chelsea went 2-0 up quite early on, the match ended 3-3 to compound my disappointment!

Tomorrow is my last day in Denmark, in which I will be attending one the post-conference Summits.

Other posts in this series
4 days of Dockercon – Day 4
4 days of Dockercon – Day 2
4 days of Dockercon – Day 1
4 days of Dockercon – Day 0

Posted in Community, Events | Tagged | 4 Comments