Skip to content
Snippets Groups Projects
Commit 7906f47d authored by LAMRINI Houda's avatar LAMRINI Houda
Browse files

gitlab-ci update

parent 61897910
No related branches found
No related tags found
No related merge requests found
Pipeline #47246 failed
image: docker:latest image: docker:latest
services: services:
- docker:dind - name: docker:19.03.1-dind
alias: docker
command: ["--host=tcp://0.0.0.0:2375"]
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: "tcp://docker:2375"
DOCKER_BUILDKIT: 1
stages: stages:
- build - build
...@@ -16,7 +19,8 @@ stages: ...@@ -16,7 +19,8 @@ stages:
before_script: before_script:
- echo "Logging into GitLab Container Registry..." - echo "Logging into GitLab Container Registry..."
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- echo "Setting DNS server to 8.8.8.8"
- echo "nameserver 8.8.8.8" > /etc/resolv.conf
build-push-image: build-push-image:
stage: build stage: build
...@@ -40,3 +44,4 @@ deploy: ...@@ -40,3 +44,4 @@ deploy:
- echo "Deploying the application..." - echo "Deploying the application..."
- docker pull "$CI_REGISTRY_IMAGE:latest" - docker pull "$CI_REGISTRY_IMAGE:latest"
- docker run -d -p 5000:5000 --name flask_app "$CI_REGISTRY_IMAGE:latest" - docker run -d -p 5000:5000 --name flask_app "$CI_REGISTRY_IMAGE:latest"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment