compose: Pip install of docker-compose 1.24 fails
Description of the issue
Running pip install docker-compose==1.23.2
succeeds but pip install docker-compose
fails.
Context information (for bug reports)
Error output is: /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-Jeq6Db --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel "cffi>=1.1; python_implementation != 'PyPy'"" failed with error code 1 in None
Steps to reproduce the issue
Against docker:stable image run apk add --quiet --no-cache bash py-pip && pip install --quiet docker-compose==1.24.0
Observed result
/usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-Jeq6Db --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel "cffi>=1.1; python_implementation != 'PyPy'"" failed with error code 1 in None`
Expected result
Successful install.
Additional information
Running Docker-in-Docker for Gitlab test runner. Probably not relevant?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 72
- Comments: 41
Commits related to this issue
- Pin Compose version to 1.23.0 The CI build started failing with the following error message: `Command "/usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-NdEwYj ... — committed to pli888/gigadb-website by pli888 5 years ago
- Fix docker-compose by adding more deps (task #10634) Docker compose 1.24.0+ required more deps and bitbucket pipelines fail to run without them. Add more deps for the container before installing doc... — committed to QoboLtd/project-template by alex-mamchenkov 5 years ago
- Pin Docker Compose version to 1.23.0 Pull request for issue: #301 This is a code merge to address GitHub issue #301 that fixes the GitLab CI build which started failing with the following error me... — committed to gigascience/gigadb-website by pli888 5 years ago
- Pin docker-compose version The new 1.24.0 version has additional dependencies which breaks install. See https://github.com/docker/compose/issues/6617 — committed to openid-certification/conformance-suite by deleted user 5 years ago
- adding in GCC apparently that went missing according to [this](https://github.com/docker/compose/issues/6617) — committed to topcoder-platform/submissions-api by cwdcwd 5 years ago
- changing image again due to https://github.com/docker/compose/issues/6617 — committed to EscrutinioSocial/escrutinio-social by spgh-dev 5 years ago
- Fix docker-compose by adding more deps (task #10634) Docker compose 1.24.0+ required more deps and bitbucket pipelines fail to run without them. Add more deps for the container before installing doc... — committed to Vector1899/wordpress-pro by Vector1899 5 years ago
- Fix docker-compose by adding more deps (task #10634) Docker compose 1.24.0+ required more deps and bitbucket pipelines fail to run without them. Add more deps for the container before installing doc... — committed to DomDev126/project-template-wordpress by DomDev126 5 years ago
This is related to the new SSH support which added some new dependencies. On our test systems these dependencies are already available once pip is installed.
Unfortunately on alpine this is not the case and you need to install them manually:
We will work on updating the documentation ASAP. Apologies for the inconvenience.
As an alternative,
docker-compose
is also released as Docker image, so a quick fix would be replacingdocker:stable
bydocker/compose:1.24.0
as base image.@carlmjohnson are you running inside of an Alpine container? I am and I’m seeing the same issue. The top half of my
.gitlab-ci.yml
file looked like this:But, I had to change it to pin the Compose version.
Ran into this as well in gitlab-ci. I added a few more dependencies to fix my issue with the 1.24 release. Although, May be better to pin to the previous as others mentioned.
Notably, i had to add
libffi-dev openssl-dev libgcc
to my previous dependencies.@ulyssessouza thanks for the explanation.
It was extremely convenient and fast to install just the
docker-compose
package. I’m loathe to add six indirect development dependencies to my application’s build. The effect on build time is noticeable. Of course, this isn’t a good benchmark, but I hope it reflects the general trend.I’d love to try the new docker/compose image. I remember following that conversation, but didn’t realize that it was released… however, the image page doesn’t describe the available tags and the latest build is failing!
Some issues with this solution:
docker-compose
as an ENTRYPOINT and is, therefore, unfit for use as a GitLab CI base image. (see also https://github.com/docker/compose/issues/6614)Please document breaking changes like these. My builds started failing out of nowhere. It’s not documented in the official installation instructions and there’s not even a changelog. This blows.
docker-compose fails on clean alpine as 1.24 introduces dependency on paramiko. Pip install paramiko fails on clean alpine as it depends on gcc, make and some other packages. This can be resolved by installing paramiko using apk
apk add --no-cache py-pip py-paramiko
pip install docker-compose
Same issue using gitlab dind with image docker:stable.
suggested solution with docker-compose fix version resolves it.
There is now a
docker/compose
image that will work with gitlab (https://github.com/docker/compose/issues/6614). So the solution is to drop thescript
for building docker compose withpip
and just use a different base image in your.gitlab-ci.yml
.image: docker/compose:1.25.0-rc1
Had the same issue.
I stubbornly tried out @AnthonyMastrean suggestion:
While Anthony got a docker daemon connection error for me it worked!
I tried it with versions 1.23.2 and 1.24.
Not exactly sure why, it’s a long time ago I setup this CI file. I did notice I’m using
docker run --network host
when running the integration tests. Possibly that has something to do with it.I’ll share the interesting bits of my ci file:
The application itself is not run inside the docker-compose file. I wanted to run the linters and unit tests first and fail early. Only afterwards install docker compose using pip and run the integration tests. That is why I’m probably using
docker run --network host
to run the integration tests; thedocker
commands all relate to the image being built, while the docker-compose setup only provides the dependant services.The only thing I don’t like about this is the
docker/compose
image does not havelatest
orstable
tags. Knowing myself I’ll probably use 1.24 for the next couple of years until it breaks 😂Seems I could refactor the compose file and and run everything using docker-compose given it’s built-in the image already, but I fear I’ll hit Anthony’s issue and waste a couple of hours. Rather enjoy the 🌞 for now. Hope this helps someone!
(p.s. just realized I have to update this in over 20 repos… fml)
I’m using docker in docker with gitlab-ci and using their docker-compose docker build as suggested here https://github.com/docker/compose/issues/6617#issuecomment-477974325 and you’re going to need those deps moving forward > 1.24.0
I was wondering why my whole build setup was failing for a few days. Installing 1.23.0 seems to be a nice temporary workaround, but it would be better to have a real solution. I’m not so willing to install gcc&co inside my build machines.
Same issue here. However I moved to using the “official” installation method. Even in the alpine image. I’m installing glibc like: https://github.com/docker/compose/blob/master/Dockerfile.run Just don’t do the “apk del curl” in the end. And then using:
To download docker-compose.