compose: docker-compose 1.28.0 fails on Ubuntu 18.04: "version `GLIBC_2.28' not found"
Description of the issue
On Ubuntu 18.04, docker-compose fails with
docker-compose --version [13] Error loading Python lib ‘/tmp/_MEIn9gFoA/libpython3.9.so.1.0’: dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28’ not found (required by /tmp/_MEIn9gFoA/libpython3.9.so.1.0)
On the same machine, docker-compose 1.27.4 works as expected.
Steps to reproduce the issue
Build an image with both versions of docker-compose installed:
FROM ubuntu:18.04
RUN apt update
RUN apt install curl -y
RUN curl -L -o /usr/local/bin/docker-compose-1.28.0 \
https://github.com/docker/compose/releases/download/1.28.0/docker-compose-Linux-x86_64
RUN curl -L -o /usr/local/bin/docker-compose-1.27.4 \
https://github.com/docker/compose/releases/download/1.27.4/docker-compose-Linux-x86_64
RUN chmod +x /usr/local/bin/docker-compose-*
docker build --tag ubuntu:18.04-compose .
docker run --rm -it ubuntu:18.04-compose
Then, run both versions of docker-compose inside the image:
root@115848dbd647:/# docker-compose-1.27.4 --version
docker-compose version 1.27.4, build 40524192
root@115848dbd647:/# docker-compose-1.28.0 --version
[13] Error loading Python lib '/tmp/_MEIn9gFoA/libpython3.9.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/_MEIn9gFoA/libpython3.9.so.1.0)
Additional information
This issue was demonstrated in a Docker image for easier reproducability. It also exists on a full desktop edition of Ubuntu 18.04 that was created with
vagrant init fasmat/ubuntu1804-desktop
vagrant up
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 30
- Comments: 25 (8 by maintainers)
Commits related to this issue
- fixed docker/compose/issues/8048 — committed to al-cheb/virtual-environments by deleted user 3 years ago
I think we can use the container version of
docker-compose
until this issue is resolved.It’s also broken in CentOS 7 and Stretch.
On Ubuntu 18.04, I removed the binary and installed via pip and it worked (assuming you have python3 installed):
sudo pip3 install docker-compose
I’ve put up #8058 to resolve this. The decision was to drop back to Python 3.7 so that we can continue using the official Python images for the build. The other option would’ve been to build Python 3.9 on one of these older distros but that feels more risky.
@andryyy It is indeed LTS but Debian LTS is not the same as Ubuntu LTS, see some discussion here: https://github.com/docker/docker-ce-packaging/pull/476
Got same issue on amz linux 2, while version 1.27.0 worked well.
+1, we noticed this at my Fortune 500 company. Rolled back to 1.27.4 and we’re good. But this is really disappointing for Docker to be so cavalier about changing the build dependencies.
We haven’t 100 % decided yet (as we need more feedback to check if we’re solving all the same use cases there) but once we have the compose-cli easily available on Linux, we’d like people to give it a try!
I confirm that the issue is fixed in 1.28.2. Thank you!
@johnthagen yes, that would’ve helped in this case. We aren’t using any Python 3.8 (or later) features in
docker-compose
though.The other route is to use the
docker<space>compose
support that we’re adding to the Docker CLI (see: https://github.com/docker/compose-cli). On Windows and macOS this is included in Docker Desktop. We are still working on a good way to get this to Linux users.Seeing the same in my environment - happy that a fix is already in the works 👍
Has it been resolved?
It doesn’t work on Amazon LInux 2 either.
1.27.4
works fine.