Updated Dockerfile

This commit is contained in:
Yami Odymel 2025-01-14 08:51:47 +08:00
parent 9fb2916117
commit b921b6a933
No known key found for this signature in database
GPG Key ID: 68E469836934DB36

View File

@ -1,11 +1,12 @@
FROM golang:latest
FROM golang:1.23-alpine AS builder
WORKDIR /workspace
COPY ./ ./
RUN go build -o chaturbate-dvr .
FROM scratch AS runnable
WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY --from=builder /workspace/chaturbate-dvr /chaturbate-dvr
COPY . .
RUN go build
CMD [ "sh", "-c", "./chaturbate-dvr -u $USERNAME" ]
ENTRYPOINT ["/chaturbate-dvr"]