1

Estoy intentando compilar en Windows 10 una imagen con Docker (creo, todavía no sé mucho del tema) con el comando docker build -t getting-started . y aparece el siguiente log con el 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

Este es el contenido de mi 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"]

Estoy siguiendo la guía Sample application de Docker: https://docs.docker.com/get-started/02_our_app/

1 respuesta 1

1

Para instalar python en alpine tienes que indicar la versión de python que necesitas.

Python3

RUN apk add --no-cache python3 g++ make

Python2

RUN apk add --no-cache python2 g++ make
2
  • Excelente, funcionó. Muchas gracias.
    – V0LT3RR4
    Commented el 9 nov. 2021 a las 12:33
  • De nada amigo..
    – loki
    Commented el 9 nov. 2021 a las 16:14

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.