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

284
Visualizações
Add a new entrypoint to a docker image

Recently, we decided to move one of our services to docker container. The service is product of another company and they have provided us the docker image. However, we need to do some extra configuration steps in the container entrypoint.

The first thing I tried, was to create a DockerFile from the base image and then add commands to do the extra steps, like this:

From baseimage:tag 
RUN chmod a+w /path/to/entrypoint_creates_this_file

But, it failed, because these extra steps must be run after running the base container entrypoint.

Is there any way to extend entrypoint of a base image? if not, what is the correct way to do this?

Thanks

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I finally ended up calling the original entrypoint bash script in my new entrypoint bash script, before doing other extra configuration steps.

over 4 years ago · Santiago Trujillo Relatório

0

You do not need to even create a new Dockerfile. To modify the entrypoint you can just run the image using the command such as below:

docker run --entrypoint new-entry-point-cmd baseimage:tag <optional-args-to-entrypoint>

over 4 years ago · Santiago Trujillo Relatório

0

create your custom entry-point file

-> add this to image

-> specify this as your entrypoint file

FROM image:base

COPY /path/to/my-entry-point.sh /my-entry-point.sh
// do sth here

ENTRYPOINT ["/my-entry-point.sh"]
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