server: create dockerfile

This commit is contained in:
2026-05-25 23:06:29 +00:00
parent 1b84fd3128
commit b370d50e8b
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
server/.env
+16
View File
@@ -0,0 +1,16 @@
################################################################################
# App builder stage
FROM golang:1.26.3-trixie@sha256:0f6b034c99663ea8957e7dae99124e37374cbe7fcb5b5646f19b185f8f976279 AS app-builder
COPY server/ /opt/server
WORKDIR /opt/server
RUN go get && CGO_ENABLED=0 go build -o out/scannerbot-server
################################################################################
# Final squashed image
FROM scratch AS final
# Copy yt-dlp-bot app binary
COPY --from=app-builder /opt/server/out/scannerbot-server /bin/
ENTRYPOINT ["/bin/scannerbot-server"]