From 6d824581ec9d259550186ff8dae046e51496742d Mon Sep 17 00:00:00 2001 From: francois Date: Mon, 20 Jun 2022 04:15:59 +0000 Subject: [PATCH] Add new file --- .gitlab-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2e1d425 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +# .gitlab-ci.yml + +variables: + IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG + # Tell 'docker:dind' to enable TLS (recommended) + # and generate certificates in the specified directory. + DOCKER_TLS_CERTDIR: "/certs" + +build-push-docker-image-job: + # Specify a Docker image to run the job in. + image: docker:latest + # 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: + - docker:dind + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build -t $IMAGE_TAG . + - docker push $IMAGE_TAG