Files
discord-auto-voice/Dockerfile
groot 4ecaaf827d
All checks were successful
release-tag / release-image (push) Successful in 2m3s
Dockerfile aktualisiert
2025-08-12 15:37:11 +00:00

37 lines
876 B
Docker
Raw 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/autovoice
# 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/autovoice /bin/autovoice
#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 LOBBY_CHANNEL_ID=0 \
DISCORD_TOKEN=0 \
GUILD_ID=0 \
CATEGORY_ID=0 \
TIMEOUT_MIN=1 \
CONFIG_PATH=/data/guild_config.json
ENTRYPOINT ["/bin/autovoice"]