How use a different Docker version?

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

     - sudo curl -L -o /usr/bin/docker '' && 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?

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

Using Docker 1.6.2 or 1.9.0-rc4 ?

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

It worked! great!

Great. Can you mark this as solved?

Of course. I haven’t had noticed that.



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 '' 
    - 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.

1 Like

Which is the latest Docker version provided by default ?

The default version is 1.8.2.

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

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.

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

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.

@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?

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

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