Files
discord-auto-voice/Dockerfile
groot fb62aaa7b8
All checks were successful
release-tag / release-image (push) Successful in 2m0s
build-binaries / build (, amd64, linux) (push) Has been skipped
build-binaries / build (, arm, 7, linux) (push) Has been skipped
build-binaries / build (, arm64, linux) (push) Has been skipped
build-binaries / build (.exe, amd64, windows) (push) Has been skipped
build-binaries / release (push) Has been skipped
Dockerfile aktualisiert
2025-08-13 18:16:31 +00:00

36 lines
897 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -------- Dockerfile (Multi-Stage Build) --------
# 1. Builder-Stage
FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/vocalforge
# 2. Runtime-Stage
FROM alpine:3.22
# HTTPS-Callouts in Alpine brauchen ca-certificates
RUN apk add --no-cache ca-certificates
#RUN mkdir /data
#RUN mkdir /dynamicsrc
RUN mkdir /tempsrc
COPY --from=builder /bin/vocalforge /bin/vocalforge
#COPY ./static /data/static
COPY ./language.json /tempsrc/language.json
#COPY ./dynamicsrc /dynamicsrc
# Default listens on :8080 siehe main.go
EXPOSE 8080
# Environment defaults; können per compose überschrieben werden
ENV PRESENCE_GUILD_ID=0 \
DB_PATH=/data/guild_config.db \
TIMEOUT_MIN=1 \
DISCORD_TOKEN=0 \
TRANSLATIONS_FILE=/tempsrc/language.json
VOLUME /data
ENTRYPOINT ["/bin/vocalforge"]