From 7bc56dc6c57696ea9d35861817d1ca42ba56b329 Mon Sep 17 00:00:00 2001 From: Jose134 Date: Sat, 10 Aug 2024 01:53:37 +0200 Subject: [PATCH] Created dockerfile, updated jenkinsfile --- Dockerfile | 14 ++++++++++++++ Jenkinsfile | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Dockerfile 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 .' } } }