2022-06-20 04:15:59 +00:00
|
|
|
# .gitlab-ci.yml
|
|
|
|
|
|
|
|
build-push-docker-image-job:
|
|
|
|
# Specify a Docker image to run the job in.
|
2022-07-09 16:30:51 +00:00
|
|
|
image: docker:20-dind
|
2022-06-20 04:15:59 +00:00
|
|
|
# Specify an additional image 'docker:dind' ("Docker-in-Docker") that
|
|
|
|
# will start up the Docker daemon when it is brought up by a runner.
|
|
|
|
services:
|
2022-07-09 16:30:51 +00:00
|
|
|
- name: docker:20-dind
|
|
|
|
alias: docker
|
|
|
|
command: ["--tls=false"]
|
2022-06-20 04:15:59 +00:00
|
|
|
script:
|
2022-07-09 16:30:51 +00:00
|
|
|
- docker image build --tag $DOCKER_REGISTRY/$IMAGE_TAG .
|
|
|
|
- docker push $DOCKER_REGISTRY/$IMAGE_TAG
|
|
|
|
variables:
|
|
|
|
DOCKER_DRIVER: overlay2
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
DOCKER_HOST: tcp://docker:2375/
|
|
|
|
IMAGE_TAG: emoji-flask-app:$CI_COMMIT_REF_SLUG
|
|
|
|
DOCKER_REGISTRY: docker-registry.dev.jevalide.ca
|