Best practices for upgrading docker past 17.05.0-ce


(Allen - Watchman Monitoring) #1

Probably related to the discussions here:

and here

I’ve used the standard/recommended docker install, and am getting the following message on upgrade:

WARNING: Docker version 17.05.0-ce deprecated, recommend upgrade to 17.06.2 or newer.

What’s the best way to upgrade docker in this case?


(Rafael dos Santos Silva) #2

Always follow the official docs, aka Get Docker CE for Ubuntu | Docker Documentation


(Jay Pfaffman) #3

Except discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub says to

wget -qO- https://get.docker.com/ | sh

Which the “official docs” say "Using these scripts is not recommended for production environments, " I think that they issue that warning mostly because blindly trusting someone else’s script with root access to your system is foolhardy from a security standpoint.

If find Docker’s official docs to be surprisingly difficult to make sense of. And why don’t they include docker-compose in the Linux binaries, when they do for Mac and Windows?

Well, if you installed it using the get.docker.com approach, it’s just as safe to use it to upgrade. You get a warning and have to wait 20 seconds, but it generally works.


(Christoph) #4

So what exactly does it mean to upgrade using the get docker script? Do I just do

wget -qO- https://get.docker.com/ | sh

exactly as I did upon first install?

I also wonder whether getting this message (WARNING: Docker version 17.05.0-ce deprecated, recommend upgrade to 17.06.2 or newer.) is normal or whether it indicates something is wrong with my server configuration.


(Jay Pfaffman) #5

Do you have docker-ce installed or some older version?

Have you tried

apt install docker-ce

Did you pin that version of docker a long while ago when there was a docker bug? (it took me a while to remember how to undo that.)


(Allen - Watchman Monitoring) #6

When I read about the “convenience script” here:
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script

It seems to me that using wget -qO- https://get.docker.com/ | sh was more for temporary use. It goes on to say

If you installed Docker using the convenience script, you should upgrade Docker using your package manager directly.

In my experience, that wouldn’t get me past the v17 hurdle, requiring that I remove & re-install docker.

Perhaps that’s a one-time pain for all users of wget get.docker.com pre 18? Perhaps it’ll happen again on v19? i don’t know.


(Jay Pfaffman) #7

It was once the case that the version of docker available in Ubuntu was too old to be useful, so the convenience script was necessary, but perhaps those days are gone. I’ll see what version of docker 18.04 installs.


(Christoph) #8

Not sure if this is useful to anyone but I thought I’d mention it:

apt install docker-ce gives me

Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate

I suppose that means that I don’t have docker-ce.

Yes, I did, but I deleted the docker.pref a long time ago, assuming that docker would then upgrade by itself, but it didn’t. So that’s why I was looking for ways to get back on track as docker (or discourse?) kept explaining that my docker version is deprecated.

Long story short: wget -qO- https://get.docker.com/ | sh did the trick. Looks like I’m on 18.09 now:

$ docker version
Client:
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:48:57 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:16:44 2018
  OS/Arch:          linux/amd64
  Experimental:     false