Skip to content
Snippets Groups Projects
Commit 7a4a0794 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Avoid erasing the developers' Docker config on local builds

parent 1bd9ce38
No related branches found
No related tags found
1 merge request!358Avoid erasing the developers' Docker config on local builds
Pipeline #131195 passed
......@@ -20,10 +20,12 @@ if [ -z "$VERSION" -o -z "$CI_PROJECT_DIR" -o -z "$CI_REGISTRY_IMAGE" ]; then
exit 1
fi
# Authenticate on docker.io using common credentials to avoid quota issues
mkdir -p ~/.docker || true
echo "$DOCKER_AUTH_CONFIG" > ~/.docker/config.json
docker login index.docker.io
if [ -n "$DOCKER_AUTH_CONFIG" ]; then
# Authenticate on docker.io using common credentials to avoid quota issues
mkdir -p ~/.docker || true
echo "$DOCKER_AUTH_CONFIG" > ~/.docker/config.json
docker login index.docker.io
fi
if [ -n "$CI_REGISTRY" -a -n "$CI_REGISTRY_USER" -a -n "$CI_REGISTRY_PASSWORD" ]; then
echo Logging in to container registry…
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment