Skip to content

Instantly share code, notes, and snippets.

@felipsmartins
Last active July 19, 2023 20:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipsmartins/bba7f8d56669a8631d1bc56d09d72cae to your computer and use it in GitHub Desktop.
Save felipsmartins/bba7f8d56669a8631d1bc56d09d72cae to your computer and use it in GitHub Desktop.
DOCKER CONTAINERS LOCAL REGISTRY
#https://docs.docker.com/registry/deploying/
docker run -d -p 5000:5000 --name registry -v /home/martins/devel/docker/local-registry:/var/lib/registry registry:2
# test steps
#docker pull ubuntu:16.04
#docker tag ubuntu:16.04 localhost:5000/my-ubuntu
#docker push localhost:5000/my-ubuntu
#docker image remove ubuntu:16.04
#docker image remove localhost:5000/my-ubuntu
#docker pull localhost:5000/my-ubuntu
# =============================================================
# exemplo de usar com jetbrins uma imagem construida localmente
# exemplo de uma imagem chamada sso-sso
docker start registry
docker tag sso-sso localhost:5000/sso-sso
# https://www.jetbrains.com/help/idea/docker-images.html#configure-registry
# crie um Docker Registry do tipo Generic. Adicione o endereço local (localhost:5000)
# no campo username e password colocar qualquer coisa (jebtrains obriga preencher mesmo se o registry não usa auth)
# Usando a imagem localhost:5000/sso-sso
# adicione um remote interpreter docker (janela "New Target: Docker")
# campo "Image": use a opção "Pull or use existing"
# cammpo "Image tag": coloque "localhost:5000/sso-sso" e clique em "Next"
# no novo modal output mostra algum erro de auth login, mas pode ignorar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment