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

274
Vistas
What environment variables can be used with a Docker image?

I'm just learning Docker. If I want to use a particular image from Docker Hub, such as mysql, how do I know what environment variables can be used with that Docker image? Any way to get a list of the available variables?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

If you look at any Dockerfile, search for lines that begin with ENV:

cat Dockerfile | grep ENV

If only an image is available, you can always do (--format=... is optional):

docker history --format="{{.CreatedBy}}" --no-trunc myimage  | grep ENV
over 4 years ago · Santiago Trujillo Denunciar

0

You can simply run it and see. This is what I got when I tried to run

docker run -it mysql
error: database is uninitialized and password option is not specified 
  You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
over 4 years ago · Santiago Trujillo Denunciar

0

Two ways to get the list of env variables:

  1. You can checkout Dockerfile and look for ENV or docker run command and look for -e key value.

  2. You can also check what actual env variables are populated in running container by following command -

    docker exec -it <container id> env

This will give you a list of all populated env vars in that container.

over 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