Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

276
Visualizações
Dockerfile: unable to copy file

As my Docker container starts up, I need to run this line:

cp /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2

Both of these files only exist in the Docker container after some packages have been installed.

In the Dockerfile, I have tried:

RUN cp /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
COPY /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
ENTRYPOINT ["cp","/lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2"]

And also created a bash script that contains (among other things) this line. I know the script has run as the other changes it makes are present, but the file is not copied.

#!/bin/sh

apk add build-base
apk add libc6-compat

cp /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2

Then run with

RUN ./my_bash_script.sh

However, when I use the command line in the Docker container, and run the line manually, it works.

Why are the Dockerfile commands not copying this file?

Edit: My complete Dockerfile

FROM golang:alpine
ENV APP_NAME hello-world
ADD env_setup.sh .
RUN chmod +x env_setup.sh
RUN ./env_setup.sh
WORKDIR /home/helloworld
ADD vendor/ ./vendor/
COPY main.go .
COPY go.mod .
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Multiple resources may be specified but the paths of files and directories will be interpreted as relative to the source of the context of the build

Try to firstly copy the file to the local directory where the Dockerfile is located

Then

COPY libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda