fix: playout Dockerfile use existing go.mod instead of init
This commit is contained in:
1 parent
587561f9fc
commit
8064e459f2
1 file changed
+3
-4
@@ -2,11 +2,10 @@ FROM golang:1.25-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
COPY src/go.mod src/go.sum ./
|
||||||
|
|
||||||
# Initialize Go module if not present
|
# Download dependencies and build
|
||||||
RUN go mod init playout || true
|
RUN go mod download
|
||||||
RUN go mod tidy
|
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /playlist-manager ./src/playlist.go
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /playlist-manager ./src/playlist.go
|
||||||
|
|
||||||
FROM alpine:3.20
|
FROM alpine:3.20
|
||||||
|
|||||||
Reference in new issue
Block a user