asdf
Some checks failed
gitea/video-server-backend/pipeline/head There was a failure building this commit
Some checks failed
gitea/video-server-backend/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7bc56dc6c5
commit
5d28505b3e
18
Dockerfile
18
Dockerfile
@ -1,14 +1,12 @@
|
||||
# Use the official Go image as the base image
|
||||
FROM golang:1.22.6
|
||||
FROM golang:1.22
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
# Copy the source code into the container
|
||||
COPY . .
|
||||
RUN go build -v -o /usr/local/bin/app ./cmd/video_server_backend/main.go
|
||||
|
||||
# Build the Go application
|
||||
RUN go build -o app ./cmd/video_server_backend/main.go
|
||||
|
||||
# Set the entry point for the container
|
||||
ENTRYPOINT ["./app"]
|
||||
CMD ["app"]
|
||||
|
||||
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -1,5 +1,9 @@
|
||||
pipeline {
|
||||
agent any
|
||||
agent {
|
||||
docker {
|
||||
image 'docker:latest'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Docker build') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user