I'm trying to compile an image with Docker on Windows 10 (I think, I still don't know much about it) with the command docker build -t getting-started .
and the following log appears with the error:
[+] Building 8.2s (12/15)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 2.0s
=> [auth] docker/dockerfile:pull token for registry-1.docker.io 0.0s
=> CACHED docker-image://docker.io/docker/dockerfile:1@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59 0.0s
=> [internal] load .dockerignore 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> [internal] load metadata for docker.io/library/node:12-alpine 1.1s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 2.49kB 0.0s
=> CACHED [1/5] FROM docker.io/library/node:12-alpine@sha256:1ecf7789a48e604a841409e65cf2e172d5a014ecd5e60689137d785 0.0s
=> ERROR [2/5] RUN apk add --no-cache python g++ make 4.6s
------
> [2/5] RUN apk add --no-cache python g++ make:
#11 0.368 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
#11 1.910 fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
#11 4.561 ERROR: unable to select packages:
#11 4.603 python (no such package):
#11 4.603 required by: world[python]
------
executor failed running [/bin/sh -c apk add --no-cache python g++ make]: exit code: 1
This is the content of my Dockerfile:
# syntax=docker/dockerfile:1
FROM node:12-alpine
RUN apk add --no-cache python g++ make
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
I am following Docker's Sample application guide : https://docs.docker.com/get-started/02_our_app/
To install python in alpine you have to indicate the version of python you need.
python3
python2