How use a different Docker version?

docker

#1

Recent CircleCI Docker upgrade to version 1.8.2 broke my build as that version is affected by this bug.

I’ve tried to downgrade to Docker 1.6.2 adding the following definition in my circle.yml

 pre:
     - sudo curl -L -o /usr/bin/docker 'http://s3-external-1.amazonaws.com/circle-downloads/docker-1.6.2-circleci' && sudo chmod 0755 /usr/bin/docker

However my build hung reporting the following error message:

service docker start returned exit code 1

I suspect the Docker engine 1.8.2 command line isn’t backward compatible with 1.6.2 version, so it fails.

I’ve also tried to upgrade to latest 1.9.0-rc3 (with fixes the above docker issue). With this version the docker service starts and the build runs, however it fails with the following message:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

You can find more about this build at this link.

Any idea how I can solve this problem?


Docker 1.10 support?
#2

Can you try adding the following line before the curl command?

- echo 'DOCKER_OPTS="-s btrfs -e lxc -D"' | sudo tee -a /etc/default/docker


#3

Using Docker 1.6.2 or 1.9.0-rc4 ?


#4

I meant using 1.6.2. We don’t have 1.9.0-rc yet.


#5

It worked! great!


#6

Great. Can you mark this as solved?


#7

Of course. I haven’t had noticed that.

Thanks!


#8

UPDATED 4th Dec

If you want to use Docker 1.6 or 1.7, please add the following to your circle.yml.

    - sudo curl -L -o /usr/bin/docker 'http://s3-external-1.amazonaws.com/circle-downloads/docker-1.6.2-circleci' 
    - sudo chmod 0755 /usr/bin/docker
    - sudo sed -i -e 's/ --userland-proxy=false//' /etc/default/docker
    - sudo sed -i -e 's/exec "$DOCKER" daemon $DOCKER_OPTS/exec "$DOCKER" --daemon $DOCKER_OPTS/' /etc/init/docker.conf

You can replace 1.6.2 with 1.7.1 if you need to use Docker 1.7.


#9

Which is the latest Docker version provided by default ?


#10

The default version is 1.8.2.


#11

I also had issues with 1.8.2 but 1.9.1 worked for me.


#12

Is this still the correct method of manually defining the Docker version? We just implemented this but it has since increased our build times by an average of 5 minutes each.


#13

@barkerja Downloading docker finishes in a blink of eye, so the increased 5 mints is definilitely strange. Maybe it’s not because of Docker?


#14

Hi @kimh, thanks for the response! According to the CircleCI dashboard, it’s definitely the newly added step. See attached screenshot:

As you can see, the docker config/setup step is taking around 5 ½ minutes.


#15

@barkerja That’s totally crazy! The Docker binary is about 25M and downloading should finish in 1~2 sec in AWS network as you can see in the screenshot. Maybe it was due to intermittent network slowness? Can you reproduce this?


#16

I’ve had 9 builds in the past day and a half, and all have the same time (5 - 6 minutes).


#17

@barkerja Got it. I’ll take a look at what’s going on with your build.


#18