I have a pipeline which deploys my container from GitLab. Last deployment was 5 days ago and went without any problems. Today I deploy it and get the following error:
$ apk add --no-cache curl python py-pip 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 ERROR: unsatisfiable constraints: python (missing): required by: world[python]
My job definition is:
my-deploy: type: my-deploy image: docker:stable script: - apk update - apk add --no-cache curl python py-pip <-- Here the erorr happens ...
For comparison purposes, the download size of python:3.10-slim-bullseye is 45MB, and python:3.10-alpine is 18MB. Their uncompressed on-disk sizes are 125MB and 48MB respectively.
To install Docker on Alpine Linux, run apk add --update docker openrc. The Docker package is available in the Community repository. Therefore, if apk add fails because of unsatisfiable constraints error, you need to edit the /etc/apk/repositories file to add (or uncomment) a line.
Docker Hub contains a number of Python Official Images for use with your project.
Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications.
When you’re choosing a base image for your Docker image, Alpine Linux is often recommended. Using Alpine, you’re told, will make your images smaller and speed up your builds.
Setting up a Python Development Environment with Docker and Alpine Linux! Frist, download and install Docker Desktop in your computer. Once, you are done with that, you can follow the steps here to create a development environment! Note the first 3 letters of your alpine linux docker container.
Using Alpine, you’re told, will make your images smaller and speed up your builds. And if you’re using Go that’s reasonable advice. But if you’re using Python, Alpine Linux will quite often:
Just like the main python docker image, it creates useful symlinks that are expected to exist, e.g. python3.4 > python, pip2.7 > pip, etc.) Added testing and community repositories to Alpine's /etc/apk/repositories file
From this issue on the Docker's repo:
This was "broken" while updating our base from
alpine:3.11
toalpine:3.12
.
In order to fix it you need to specify the version of Python directly, e.g.:
apk add python2 // or apk add python3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With