Try to contact localhost:5000 instead of registry

Hopefully it will have been exposed there (doubtful)
This commit is contained in:
2020-12-28 17:41:05 +01:00
parent c46fcb14f7
commit 0ac1d8ad65

View File

@ -24,7 +24,8 @@ variables:
DOCKER_HOST: tcp://docker:2376
# Support caching images between jobs
CI_LOCAL_REGISTRY_IMAGE: "registry:5000/reseed-tools"
CI_LOCAL_REGISTRY_NAME: "localhost:5000"
CI_LOCAL_REGISTRY_IMAGE: "localhost:5000/reseed-tools"
# CI_LOCAL_REGISTRY_USER: registry
# CI_LOCAL_REGISTRY_PASSWORD: thisismyregistry
@ -48,7 +49,9 @@ build_docker:
- apk add --no-cache curl
script:
# Make sure we can connect to the registry service
- curl http://registry:5000/v2/
- docker ps
- docker inspect registry
- curl http://$CI_LOCAL_REGISTRY_NAME/v2/
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_LOCAL_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA --tag $CI_LOCAL_REGISTRY_IMAGE:latest .
- docker push $CI_LOCAL_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
@ -72,4 +75,5 @@ push_docker:
# - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
# - docker push $CI_REGISTRY_IMAGE:latest
only:
- master
- tags