question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker-compose up fails with "ERROR: unsatisfiable constraints"

See original GitHub issue

When I follow the instructions for Run with Docker Compose, the command docker-compose up fails with the following error:

$ docker-compose up
Creating network "formio-1460_default" with the default driver
Creating volume "formio-1460_mdb-data" with default driver
Building formio
Step 1/11 : FROM node:lts-alpine
 ---> 56bc3a1ed035
Step 2/11 : WORKDIR /app
 ---> Using cache
 ---> 06986813e392
Step 3/11 : RUN apk update &&     apk upgrade &&     apk add python=2.7.15-r3 &&     apk add make=4.2.1-r2 &&     apk add g++=8.3.0-r0
 ---> Running in 918180a1e852
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
v3.9.4-1-g3c20033f75 [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]
v3.9.4-2-g58b26b850f [http://dl-cdn.alpinelinux.org/alpine/v3.9/community]
OK: 9766 distinct packages available
OK: 7 MiB in 16 packages
ERROR: unsatisfiable constraints:
  python2-2.7.16-r1:
    breaks: world[python=2.7.15-r3]
ERROR: Service 'formio' failed to build: The command '/bin/sh -c apk update &&     apk upgrade &&     apk add python=2.7.15-r3 &&     apk add make=4.2.1-r2 &&     apk add g++=8.3.0-r0' returned a non-zero code: 1

This happens on both the master branch, and the latest release v1.46.0.

I believe the problems is that the Dockerfile tries to add a very specific version of python, but after an apk update, there is no guarantee that that exact version number exists. In this case, the python version available, 2.7.16-r1 is newer than the demanded version 2.7.15-r3.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
terryhowelljrcommented, Mar 21, 2020

I just changed the Docker file python to r2 and it worked.

RUN apk update && \ apk upgrade && \ apk add python=2.7.16-r2 && \ apk add make=4.2.1-r2 && \ apk add g++=8.3.0-r0

1reaction
sascha-schieferdeckercommented, Jan 21, 2020

I cannot confirm #899 is a fix to this issue, I had to set python 2.7.16-r2 to succeed in building the master branch:

# "bcrypt" requires python/make/g++, all must be installed in alpine
# (note: using pinned versions to ensure immutable build environment)
RUN apk update && \
    apk upgrade && \
    apk add python=2.7.16-r2 && \
    apk add make=4.2.1-r2 && \
    apk add g++=8.3.0-r0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker : ERROR: unsatisfiable constraints - Stack Overflow
This thread helped me. Failed Attempt & Error Message: ❯ docker run -it alpine sh / # apk update fetch http://dl-cdn.
Read more >
[Solved]-Docker : ERROR: unsatisfiable constraints-docker
Sometimes the packages that are being installed are moved from different registry branches. The default Docker Alpine image only has certain registries set....
Read more >
docker compose up - Docker Documentation
When the command exits, all containers are stopped. Running docker compose up --detach starts the containers in the background and leaves them running....
Read more >
Installation of Docker on Alpine Linux - Genesys Documentation
The Docker package is available in the Community repository. Therefore, if apk add fails because of unsatisfiable constraints error, ...
Read more >
Docker build fails - Google Groups
It appears that running "docker-compose build" fails. amertz:django-rest-framework-gis ... ERROR: unsatisfiable constraints: so:libcrypto.so.1.1 (missing):.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found