We are experiencing a failure in our Bitbucket pipeline related to the Docker client version. Even after attempting to upgrade Docker in our pipeline image, the pipeline continues to use an older Docker client, resulting in API compatibility issues.
We are experiencing a failure in our Bitbucket pipeline related to the Docker client version. Even after attempting to upgrade Docker in our pipeline image, the pipeline continues to use an older Docker client, resulting in API compatibility issues.
Pipeline Configuration:
image:
name: <image>
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
options:
max-time: 90
Base image <image> is a custom Node-based image.
In the Dockerfile, we attempt to upgrade Docker to version 28.5.2:
ENV DOCKER_VERSION="28.5.2" RUN export VERSION=${DOCKER_VERSION}; \ curl -fsSL --retry 3 https://get.docker.com | sh && \ docker --version
Observed Behavior:
When running the pipeline on master, the following error occurs:
docker: Error response from daemon: client version 1.41 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version.
Running docker --version inside the pipeline step reports:
Docker version 20.10.24, build 297e128
Are you using a self hosted runner with docker image docker:dind? The docker image got updated recently and does not allow that client version anymore.
The client is on the pipeline runner image:
$ docker run -it --entrypoint /opt/atlassian/pipelines/runner/docker docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:latest --version
Docker version 20.10.24, build 297e128
If that is the case, you should be fine with docker:28-dind instead of docker:dind.
Would like to see atlassian updating the docker cli on the image though.
so we added this service section in the pipeline:
docker-dind:
type: docker
image:
name: docker:29.0-dind
and then us it
- step: &docker_test
services: [docker-dind]
size: 4x
runs-on:
- 'self.hosted'
script:
- docker --version
but still get this output in the pipeline
Docker version 20.10.24, build 297e128So i don't see anything that could help us except going away from self hosted runners
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marcus
A community post was recently made that highlights this and potential fix in further detail - please let us know if this helps :)
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We're experiencing the same problem. So we have to downgrade for now. If someone from the respective atlassian team reads this, please fix this in the image
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We're experiencing the same problem. So we have to downgrade for now. If someone from the respective atlassian team reads this, please fix this in the image
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.