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
|
||||||
FROM golang:1.22.6
|
|
||||||
|
|
||||||
# Set the working directory inside the container
|
WORKDIR /usr/src/app
|
||||||
WORKDIR /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 . .
|
COPY . .
|
||||||
|
RUN go build -v -o /usr/local/bin/app ./cmd/video_server_backend/main.go
|
||||||
|
|
||||||
# Build the Go application
|
CMD ["app"]
|
||||||
RUN go build -o app ./cmd/video_server_backend/main.go
|
|
||||||
|
|
||||||
# Set the entry point for the container
|
|
||||||
ENTRYPOINT ["./app"]
|
|
||||||
|
|||||||
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -1,5 +1,9 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent {
|
||||||
|
docker {
|
||||||
|
image 'docker:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Docker build') {
|
stage('Docker build') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user