docker
This commit is contained in:
@@ -78,15 +78,17 @@ variables:
|
|||||||
# services:
|
# services:
|
||||||
# - docker:dind
|
# - docker:dind
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build:
|
||||||
|
image: docker:20.4.5
|
||||||
|
|
||||||
|
stage: build
|
||||||
before_script:
|
before_script:
|
||||||
# docker login asks for the password to be passed through stdin for security
|
# docker login asks for the password to be passed through stdin for security
|
||||||
# we use $CI_REGISTRY_PASSWORD here which is a special variable provided by GitLab
|
# we use $CI_REGISTRY_PASSWORD here which is a special variable provided by GitLab
|
||||||
# https://docs.gitlab.com/ce/ci/variables/predefined_variables.html
|
# https://docs.gitlab.com/ce/ci/variables/predefined_variables.html
|
||||||
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
|
||||||
image: docker:20.4.5
|
|
||||||
|
|
||||||
Build:
|
|
||||||
stage: build
|
|
||||||
script:
|
script:
|
||||||
# fetches the latest image (not failing if image is not found)
|
# fetches the latest image (not failing if image is not found)
|
||||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||||
|
|||||||
Reference in New Issue
Block a user