feat: initial commit
This commit is contained in:
15
deploy/Dockerfile
Normal file
15
deploy/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# Stage 1: Build
|
||||
FROM golang:1.22-alpine AS builder
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o /bot ./cmd/bot
|
||||
|
||||
# Stage 2: Runtime
|
||||
FROM alpine:3.19
|
||||
RUN apk add --no-cache ffmpeg ca-certificates tzdata
|
||||
COPY --from=builder /bot /bot
|
||||
RUN adduser -D -u 1001 botuser
|
||||
USER botuser
|
||||
ENTRYPOINT ["/bot"]
|
||||
Reference in New Issue
Block a user