Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

290
Visualizações
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?

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

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.

about 4 years ago · Santiago Trujillo Relatório

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
about 4 years ago · Santiago Trujillo Relatório

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.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda