Use DinD in Package Job and Create Dockerfile

This commit is contained in:
Thomas Schleicher 2024-10-22 19:01:12 +02:00
parent c2615d02c3
commit df1b64c4f6
2 changed files with 12 additions and 1 deletions

View file

@ -28,7 +28,7 @@ package_job:
stage: package
image: docker:latest
services:
- docker:bind
- docker:dind
script:
- echo "Building Docker image..."
- docker build -t ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} .

11
dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM ubuntu:20.04
ENV BUILD_DIR="build"
ENV APPLICATION_BINARY="Application"
ENV OPEN_PORT=8080
WORKDIR /app
COPY ${BUILD_DIR}/${APPLICATION_BINARY} .
EXPOSE ${OPEN_PORT}
CMD [ "./${APPLICATION_BINARY}" ]