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

351
Vistas
Inject AWS Codebuild Environment Variables into Dockerfile

Is there a way to pass AWS Codebuild environment variables into a Dockerfile? I'd like to be able to pull from ECR like this:

FROM $My_AWS_ACCOUNT.dkr.ecr.us-east-1.amazonaws.com/someimage:latest

Where $My_AWS_ACCOUNT references an environment variables within my codebuild project.

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

0

Yes, you can use FROM ${My_AWS_ACCOUNT}.xxx. My_AWS_ACCOUNT should be passed as an argument to the docker build. This is how I would do it:

ARG My_AWS_ACCOUNT=SOME_DEFAULT_IMAGE FROM ${My_AWS_ACCOUNT}.xxx

When you build: docker build --build-arg My_AWS_ACCOUNT=${My_AWS_ACCOUNT}

over 4 years ago · Santiago Trujillo Denunciar

0

Yet another amazingly annoying thing in Docker that doesn't actually need to be this difficult but for some reason is supremely complicated and/or non-intuitive.

command line:

docker build --build-arg My_AWS_ACCOUNT=${My_AWS_ACCOUNT}

Dockerfile:

ARG My_AWS_ACCOUNT
FROM ${My_AWS_ACCOUNT}.dkr.ecr.us-east-1.amazonaws.com/someimage:latest
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