Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

ERROR: unsatisfiable constraints when build a dockerfile. #650

Closed
afonsoaugusto opened this issue Nov 3, 2020 · 2 comments · Fixed by #651
Closed

ERROR: unsatisfiable constraints when build a dockerfile. #650

afonsoaugusto opened this issue Nov 3, 2020 · 2 comments · Fixed by #651
Labels
waiting reply Waiting for an answer to a comment

Comments

@afonsoaugusto
Copy link
Member

afonsoaugusto commented Nov 3, 2020


name: docker build returns ERROR: unsatisfiable constraints
about: Docker build with error
labels: 🪲 bug
assignees: ''


What happened:
Hi, when execute the command docker build -t ritchie-cli . in root directory I receive the error: "ERROR: unsatisfiable constraints"

What you expected to happen:
Generate a docker image for build and run application

How to reproduce it (as minimally and precisely as possible):
In root directory the project run the command docker build .

Anything else we need to know?:
My objective is using the Dockerfile for build and run the application. I using the VScode, and is my plan use the .devcontainer feature for contribute the project.

Environment:

  • Ritchie version (use rit --version):
    • branch: master
    • commit: 8c81c544
  • Operating System:
  • Others:
    • Docker version 19.03.13, build 4484c46d9d
 ᐅ docker build -t ritchie-cli .                                                                                                                                                                                                                         
Sending build context to Docker daemon   98.5MB
Step 1/4 : ARG BUILD_IMAGE=golang:1.13-alpine
Step 2/4 : FROM $BUILD_IMAGE
 ---> 5863598a981a
Step 3/4 : RUN echo "7224aa97-1f94-4679-917d-9c7bb10074ab" > /etc/machine-id
 ---> Using cache
 ---> e6a3524349b6
Step 4/4 : RUN apk update && apk add     alpine-sdk     gettext     curl     python     py-pip     jq     git     && pip install --no-cache-dir awscli==1.16.310     && apk del py-pip     && rm -rf /var/cache/apk/* /root/.cache/pip/* /usr/lib/python2.7/site-packages/awscli/examples
 ---> Running in 299a3e320b1f
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
v3.12.1-15-gcb84081c23 [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.1-14-gd1a8d3ca7e [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
OK: 12750 distinct packages available
ERROR: unsatisfiable constraints:
  python (missing):
    required by: world[python]
The command '/bin/sh -c apk update && apk add     alpine-sdk     gettext     curl     python     py-pip     jq     git     && pip install --no-cache-dir awscli==1.16.310     && apk del py-pip     && rm -rf /var/cache/apk/* /root/.cache/pip/* /usr/lib/python2.7/site-packages/awscli/examples' returned a non-zero code: 1
@GuillaumeFalourd GuillaumeFalourd added the waiting reply Waiting for an answer to a comment label Nov 3, 2020
@afonsoaugusto
Copy link
Member Author

For solution this problem is possible to change the Dockerfile from python to python3.
But in command run is explicit the removing cache from python2.7.
What the version is necessary for project?
When the project call the python?

RUN apk update && apk add \
    alpine-sdk \
    gettext \
    curl \
    python3 \
    py-pip \
    jq \
    git \
    && pip install --no-cache-dir awscli==1.16.310 \
    && apk del py-pip \
    && rm -rf /var/cache/apk/* /root/.cache/pip/* /usr/lib/python2.7/site-packages/awscli/examples

@afonsoaugusto
Copy link
Member Author

PR is opened:
#651

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting reply Waiting for an answer to a comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants