diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..55eaae4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# Use the official Go image as the base image +FROM golang:1.22.6 + +# Set the working directory inside the container +WORKDIR /app + +# Copy the source code into the container +COPY . . + +# Build the Go application +RUN go build -o app ./cmd/video_server_backend/main.go + +# Set the entry point for the container +ENTRYPOINT ["./app"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index e7e2a94..30b3963 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,9 +2,9 @@ pipeline { agent any stages { - stage('Do nothing') { + stage('Docker build') { steps { - sh '/bin/true' + sh 'docker build -t darkbird/video-server-backend:latest .' } } }