24 lines
406 B
YAML
24 lines
406 B
YAML
|
image: docker:stable
|
||
|
|
||
|
variables:
|
||
|
DOCKER_HOST: tcp://docker:2375/
|
||
|
DOCKER_DRIVER: overlay2
|
||
|
|
||
|
services:
|
||
|
- docker:dind
|
||
|
|
||
|
stages:
|
||
|
- build
|
||
|
|
||
|
build:
|
||
|
stage: build
|
||
|
script:
|
||
|
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG .
|
||
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||
|
only:
|
||
|
- tags
|
||
|
|
||
|
after_script:
|
||
|
- docker images --filter "dangling=true" -q --no-trunc | xargs -r docker rmi
|
||
|
|