ERROR: Docker version 1.7.1 not supported, please upgrade to at least 1.8.0, or recommended 1.8.0

(Dmitry Krasnoperov) #1

I’ve just put my favorite command

./launcher rebuild app

but it reply me with

ERROR: Docker version 1.7.1 not supported, please upgrade to at least 1.8.0, or recommended 1.8.0

how to make things happens as I’m editing my SMTP settings at the moment

(Jay Pfaffman) #2

The install guide has instructions for installing docker. They should work for updating it as well.

(Jeff Atwood) #3

Actually I’m not sure

wget -qO- | sh

does an upgrade? It would be cool if it did – try that first. Otherwise Google for “upgrade Docker” and follow that.

(Jay Pfaffman) #4

I was wrong.

If you already have Docker installed, this script can cause trouble, which is
			why we're displaying this warning and provide the opportunity to cancel the

(Christopher Kampmeier) #5

Our formerly stable scripted wrapper of the Discourse build/upgrade process broke to due this change to a minimum of Docker 1.8.0.

Was this change really necessary?

This new requirement causes use of the docker-io package from the EPEL repo associated with RHEL 6.x to no longer work with Discourse. The latest version available via EPEL is 1.7.1.

Discourse has been running great for us using the EPEL provided Docker on RHEL 6. Since we generally stay away from using non-native packages where feasible, we’re not especially keen on an alternative form of installing it.

(Dmitry Krasnoperov) #6

Anyway, It does help to upgrade.
I hope it doesnt brake anything :expressionless:

(Sam Saffron) #7

You can always try to skip prereqs and see what happens there is a switch for it.

(Christopher Kampmeier) #8

We already use --skip-prereqs, but it doesn’t appear to avoid all of the checks.

#{discourse_path}/launcher bootstrap app --skip-prereqs

Since it doesn’t appear that there’s support for Docker 1.8.x on Enterprise Linux 6, it looks like we’ll need to move to Enterprise Linux 7. I just wasn’t expecting to have to do this work now. :frowning:

In the meantime, I might try to script an edit to the check or use a temporary fork to avoid the error.

(Christopher Kampmeier) #9

Doh! Looks like a bug in the launcher script. Note the inconsistent use of the trailing S:

(Dmitry Krasnoperov) #10

Please don’t shock me now!

(Simevo) #11

This is caused by this commit which has been put in yesterday by @codinghorror, immediately before the ImageMagick CVE-2016–3714 fix. I’m sure there are reasons for this change in requirements, but with many people rushing today to apply the latter, they’ll hit this problem.

In our case we’re using the stock package on Debian, which is at version 1.6.2 on stable (jessie).

For the record, the exact error message we’re getting is:

ERROR: Docker version 1.6.2 not supported, please upgrade to at least 1.8.0, or recommended 1.8.0

There is no jessie-backports for, and we’d have to upgrade to stretch to get 1.8.3. Or apt-get remove and install from source, but debianistas don’t like to do that.

In a hurry to apply the Imagemagick fix, and noticing that the commit a28dd1dcbda4b72e37da32ae4ae945f669b1ddf2 merely seems to raise the docker version requirement, I have reverted it:

$ git revert --no-commit a28dd1dcbda4b72e37da32ae4ae945f669b1ddf2
$ git status
$ git diff --cached
diff --git a/launcher b/launcher
index 907abc8..88d174d 100755
--- a/launcher
+++ b/launcher
@@ -52,8 +52,8 @@ fi
 cd "$(dirname "$0")"

After that, your favorite command ./launcher rebuild app will work.

When we have more time we’ll git stash; git pull and fix the real issue by upgrading docker !

(Alan Tan) #12

Nice catch! Can you submit a PR for it? :smile:

(Tom Newsom) #13

diff --git

Are you sure about that?

diff: unrecognized option '--git'

(Simevo) #14

oops that was part of the git diff command output. Thanks

(BaButtons) #17

To people using Ubuntu’s often outdated Docker package, here’s how you can replace it with an up-to-date version: How Do I upgrade Docker - Ask Ubuntu (That answer is for 14.04, but it’s easy to fit it to other versions).

(Jeff Atwood) #18

Yes definitely – I just checked in a fix cc @tgxworld so --skip-prereqs will actually work again.

If you add it, the following checks in launcher will be skipped:

  • is the docker daemon running?
  • is docker using aufs/btrfs/zfs/overlay?
  • is docker at a minimum version?
  • is git at a minimum version?
  • can we attach to stderr/out/tty?

So, disable those checks, but at your peril…

(Victor Aprea) #19

Hey guys, I ran:

wget -qO- | sh

… and it proceeded before I could finish reading the warnings, and then hung doing sh -c docker version. At first my discourse instance wouldn’t run, and ./launcher rebuild app seemed to hang as well. At that moment typing docker version also hung for me. I think I then typed service docker restart. I typed docker --version and saw Docker version 1.11.2, build b9f10c9 and then I typed docker version and saw:

 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:47:50 2016
 OS/Arch:      linux/amd64

 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:47:50 2016
 OS/Arch:      linux/amd64

So then I did ./launcher rebuild app again and I got this output. The excerpt of interest is:

encodings for database "postgres" do not match:  old "SQL_ASCII", new "UTF8"
Failure, exiting

You are going to need to export your data and import into a clean instance:

In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml"

Run ./launcher rebuild app again

When your instance is running:
Run ./launcher enter app
Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db

Undo the base_image and postgres template from your container config
Run: ./launcher stop app
Run: sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old
Run: ./launcher rebuild app

Run: ./launcher enter app
Run: cd /shared/postgres_backup
Run: sv stop unicorn
Run: sudo -iu postgres dropdb discourse
Run: sudo -iu postgres createdb discourse
Run: sudo -iu postgres psql discourse < backup.db
Run: exit
Run: ./launcher rebuild app

So I’m going to follow those instructions next…

(Victor Aprea) #20

@codinghorror my /var/docker directory has vanished after I did “Run ./launcher rebuild app again”. And the docker command no longer works… as in:

root@discuss-app:~# docker
bash: docker: command not found

… what the heck happened? I did successfully execute “Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db” and backup.db seems to have data in it…

… ah nevermind, I typed exit and ended, and I went from root@discuss-app to root@discuss and docker command works again… not sure what that’s about. I see when you do /launcher enter app the prompt changes and I’m in some new context.

… another tweak, the instructions talk about /var/discourse, but my installation (I know it’s old school) is at /var/docker.

… ok the site is running again! < wipes sweat from brow >

(Dmitry Krasnoperov) #21

Same story again

root@xxx:/var/discourse# git pull
Already up-to-date.
root@xxx:/var/discourse# ./launcher rebuild app
ERROR: Docker version 1.11.1 not supported, please upgrade to at least 17.03.1, or recommended 17.06.2

(cpradio) #22

You need to run wget -qO- | sh

Best practices for upgrading docker past 17.05.0-ce