2019-11-13 22:03:09 +02:00
|
|
|
image: docker:19.03.1
|
|
|
|
|
|
|
|
variables:
|
|
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
2019-12-04 22:28:59 +02:00
|
|
|
IMAGE_TAG_APP: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
2019-12-04 23:10:12 +02:00
|
|
|
IMAGE_TAG_NGINX: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-nginx
|
2019-11-13 22:03:09 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker:19.03.1-dind
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
script:
|
2019-12-04 22:28:59 +02:00
|
|
|
- docker build -t $IMAGE_TAG_APP .
|
2019-12-04 22:34:35 +02:00
|
|
|
- docker build -t $IMAGE_TAG_NGINX . -f Dockerfile.nginx
|
2019-12-04 22:28:59 +02:00
|
|
|
- docker push $IMAGE_TAG_APP
|
|
|
|
- docker push $IMAGE_TAG_NGINX
|