P
P
part_os2021-02-06 09:43:20
Continuous Integration
part_os, 2021-02-06 09:43:20

Does Docker push close the connection automatically?

There is such an assembly, I do authorization in before_script, the first docker push is executed, the second one already fails with an error.
treated by re-authorization, but why does it close the connection?
unauthorized: HTTP Basic: Access denied
ERROR: Job failed: exit status 1
Does docker push close the connection automatically? it is clear that if you add authorization again after that

backend-build:
    stage: build
    tags:
        - profitbase-manager
    before_script:
        - docker login -ugitlab-ci-token -p $CI_BUILD_TOKEN git.energy-consumer.ru
    script:
        - docker build
            --target backend
            --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}"
            --build-arg IMAGE_PHP=$IMAGE_PHP
            --build-arg UID=$IMAGE_UID
            --build-arg GID=$IMAGE_GID
            --build-arg IMAGE_BACKEND_DOWNGRADE_TAG=$IMAGE_BACKEND_DOWNGRADE_TAG
            --label "commit=${CI_COMMIT_SHA}"
            --label "vendor=energy-consumer."
            --label "project_name=${CI_PROJECT_NAME}"
            --label "branch=${CI_COMMIT_REF_SLUG}"
            --label "side=backend"
            --tag $IMAGE_BACKEND_TAG . -f backend.Dockerfile
        - docker push $IMAGE_BACKEND_TAG
        - docker tag $IMAGE_BACKEND_TAG $IMAGE_BACKEND_TAG_LATEST
        - docker push $IMAGE_BACKEND_TAG_LATEST
    only:
        refs:
            - master

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question