Files
tgex-backend/telegram_bot/Dockerfile
2026-01-06 12:38:49 +03:00

17 lines
259 B
Docker

FROM golang:1.25-alpine AS build
WORKDIR /app
# Modules layer
COPY go.mod go.sum ./
RUN go mod download
# Build layer
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /tg_bot .
FROM alpine:latest AS run
COPY --from=build /tg_bot /tg_bot
CMD ["/tg_bot"]