Skip to content
Snippets Groups Projects
Commit a34c13b4 authored by Philipp Rösner's avatar Philipp Rösner
Browse files

Update .gitlab-ci.yml file

parent 588b74ed
No related branches found
No related tags found
No related merge requests found
image: docker:latest
services:
- docker:dind
variables:
# Define the Docker image name using the GitLab CI environment variables
IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
# Login to the GitLab Container Registry
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stages:
- build
build:
stage: build
script:
# Build the Docker image using the Dockerfile
- docker build -t $IMAGE_NAME .
# Push the Docker image to the GitLab Container Registry
- docker push $IMAGE_NAME
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment