Use DinD in Package Job and Create Dockerfile
This commit is contained in:
parent
c2615d02c3
commit
df1b64c4f6
2 changed files with 12 additions and 1 deletions
|
|
@ -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
11
dockerfile
Normal 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}" ]
|
||||
Reference in a new issue