From 3cffa66144c1d462dc01de3c99f184802bf78180 Mon Sep 17 00:00:00 2001 From: Shiro-Nek0 Date: Mon, 2 Mar 2026 00:47:45 -0300 Subject: [PATCH] updated docker file for static files --- Dockerfile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index ccf7771..50e38dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,13 @@ FROM golang:1.25-alpine AS builder -# Ensure CGO is off for a static binary -ENV CGO_ENABLED=0 -# Ensure Go modules are strictly enforced -ENV GO111MODULE=on - WORKDIR /app -# Copy only the dependency files first COPY go.mod go.sum ./ RUN go mod download -# Copy the entire project structure COPY . . -# Build from the current directory (.) so it finds the module root -RUN go build -o /app/bot . +RUN CGO_ENABLED=0 GOOS=linux go build -o bot . FROM alpine:latest @@ -26,6 +18,7 @@ WORKDIR /root/ COPY --from=builder /app/bot . COPY --from=builder /app/templates ./templates +COPY --from=builder /app/static ./static COPY .env . ENV DB_PATH=/data/bot.db