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

293
Vistas
docker stack deploy from private repo

Does anyone know how to specify username / password for pulling images from a private registry during a docker stack deploy? I want to be able to do this in one command:

docker stack deploy --compose-file docker-compose.yml --username <user> --password <pass> mystack

Without this, I first have to do a

docker login -u <user> -p <pass> <registry-url>

Can this be done in one command?

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

0

This worked for me, I had a private repo on dockerhub

docker login -u <<UserName>> -p <<Password>>
registry.hub.docker.com/<<Repo_Name>>
&& docker stack deploy -c docker-swarm.yml mystack --with-registry-auth

The key is to pass Username Password along with registry name and then followed it up with this flag --with-registry-auth

Here is the link which provides step by step information.

over 4 years ago · Santiago Trujillo Denunciar

0

I think it cannot do it in one command typically, but you can configure private registry for clients with specific ip without authentication if you insist.

Or you can just do it in different commands but one line:

$ docker login -u <user> -p <pass> <registry-url> && docker stack deploy --compose-file docker-compose.yml mystack
over 4 years ago · Santiago Trujillo Denunciar

0

The issue Use SSH pub key in order to allow access to a repository #531 address the ability to connect to an repository using SSH and keys. It's a best way to mantain security and privacity.

But you can create a read only user to perform that. If you automate the process, you can recreate de user, or change password, by the way, you can choose any turn around to solve that.

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