kv-tube/backend/Dockerfile
KV-Tube Deployer 95cfe06f2c
Some checks failed
CI / lint (push) Failing after 6s
CI / test (push) Failing after 1s
Docker Build & Push / build (push) Failing after 1s
CI / build (push) Has been skipped
chore: setup Dockerfiles and CI for Forgejo and Synology
2026-02-22 17:29:42 +07:00

27 lines
428 B
Docker
Executable file

FROM golang:1.21-alpine AS builder
WORKDIR /app
RUN apk add --no-cache git
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -o kv-tube .
FROM alpine:latest
RUN apk add --no-cache ca-certificates ffmpeg curl
WORKDIR /app
COPY --from=builder /app/kv-tube .
COPY data ./data
EXPOSE 8080
ENV KVTUBE_DATA_DIR=/app/data
ENV GIN_MODE=release
CMD ["./kv-tube"]