Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

532
Vistas
Running Docker Build from Jenkins, replace hardcoded Inputs in Dockerfile with parameters

I want to run docker builds from a jenkis server, in case of this I want to specify some Inputs like passwords or path in the dockerfile as variables.

Is there a way to specify parameters for the docker build command and use this parameters as variables?

A case would be the mysql root password.

echo "mysql-server mysql-server/root_password password <<VARIABLE>>" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password <<VARIABLE>>" | sudo debconf-set-selections

Thanks for your help

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can use --build-args (link)

example:

FROM ubuntu:16.04
ARG MY_ARG
RUN ... ${MY_ARG}

and then

docker build --build-arg MY_ARG=value
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda