hypixel-bans-api/Dockerfile
2026-07-22 02:56:37 -04:00

20 lines
300 B
Docker

FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o api .
FROM alpine:latest
RUN apk --no-cache add ca-certificates wget
WORKDIR /app
COPY --from=builder /app/api .
EXPOSE 8080
ENV PORT=8080
CMD ["./api"]