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

322
Vistas
How do I use my gpg key to decrypt a file in a docker container without saving it in the image?

I'm using airflow and the dockerOperator to connect to a docker daemon and spin up a container.

As part of my pipeline this container needs to decrypt a file using gpg.

If I copy the gpg key in during docker build then it will be apart of the image forever, this feels insecure?

I have investigated whether or not I can put the key into an environment variable and pass it in that way i.e. through dockers -e VAR:VAL syntax. The only other way I can think of is to mount my local .gnupg file into the container and use that, however this will only work while I'm on my local machine. I want to be able to migrate to ECS or kubernetes at some stage.

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

0

You are correct in saying, that adding the key during docker build is insecure.

The env var is a valid way. If you use kubernetes later, you can safely save the your key as a secret in kubernetes. When deploying you can provide a secret via env to a container.

You could also provide a secret as a file from a kubernetes secret by using a volume, and mount a volume locally and provide the key file.

These are the official docs for kubernetes secrets: https://kubernetes.io/docs/concepts/configuration/secret/

I am not familiar with ECS, but I am positive that there are similar ways.

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