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 WORKDIR /usr/src/app
COPY go.mod go.sum ./ COPY --from=builder /workspace/chaturbate-dvr /chaturbate-dvr
RUN go mod download && go mod verify
COPY . . ENTRYPOINT ["/chaturbate-dvr"]
RUN go build
CMD [ "sh", "-c", "./chaturbate-dvr -u $USERNAME" ]