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

Update .gitlab-ci.yml file

parent 5298eaf5
No related branches found
No related tags found
No related merge requests found
Pipeline #47255 failed
image: ubuntu:latest
services:
- name: docker:20.10.5-dind
alias: docker
......@@ -15,6 +17,7 @@ stages:
- deploy
before_script:
- apt-get update && apt-get install -y docker.io
- echo "Logging into GitLab Container Registry..."
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- echo "Checking Docker availability..."
......@@ -24,11 +27,11 @@ build-push-image:
stage: build
script:
- echo "Building the Docker image..."
- docker version # Vérifie la version de Docker
- docker info # Affiche des informations supplémentaires sur l'environnement Docker
- docker build -t "$CI_REGISTRY_IMAGE:latest" . || (echo "Docker build failed" && exit 1)
- docker version
- docker info
- docker build -t "$CI_REGISTRY_IMAGE:latest" .
- echo "Pushing the Docker image to the registry..."
- docker push "$CI_REGISTRY_IMAGE:latest" || (echo "Docker push failed" && exit 1)
- docker push "$CI_REGISTRY_IMAGE:latest"
deploy:
stage: deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment