Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Open ResEl
Outils
CI - Docker image
Commits
07098893
Commit
07098893
authored
Feb 04, 2021
by
Nicolas Vuillermet
Browse files
Mettre à jour Dockerfile, .gitlab-ci.yml files
parent
7430bbc1
Pipeline
#7893
failed with stages
in 20 seconds
Changes
2
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
07098893
---
image
:
docker:19.03.12
variables
:
IMAGE
:
$CI_REGISTRY_IMAGE
# DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER
:
overlay2
stages
:
-
build
-
test
-
push
services
:
-
name
:
docker:19.03.12-dind
alias
:
docker
Build docker image
:
stage
:
build
before_script
:
&before_script
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script
:
-
docker build -t $IMAGE:$CI_COMMIT_SHA .
-
docker push $IMAGE:$CI_COMMIT_SHA
Push image
:
stage
:
push
before_script
:
*before_script
script
:
-
docker pull $IMAGE:$CI_COMMIT_SHA
-
docker tag $IMAGE:$CI_COMMIT_SHA $IMAGE:latest
-
docker push $IMAGE:latest
Dockerfile
0 → 100644
View file @
07098893
FROM
docker:19.03.12
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment