Compare commits

..

2 Commits

Author SHA1 Message Date
a4a778619c 2nd change Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-24 06:44:30 +03:00
43dd2e49d8 change Dockerfile
Some checks failed
continuous-integration/drone/push Build is failing
2025-06-24 06:39:31 +03:00

View File

@@ -4,7 +4,7 @@ FROM golang:1.24-alpine AS builder
# Устанавливаем рабочую директорию
WORKDIR /app
RUN apk add --no-cache build-base
# Копируем файлы зависимостей и загружаем их
# Это позволяет кэшировать слой с зависимостями, если они не менялись
COPY go.mod go.sum ./
@@ -18,7 +18,7 @@ COPY . .
# CGO_ENABLED=0 необходимо для статической линковки и использования from scratch.
# TARGETARCH будет автоматически подставлен Docker Buildx (amd64 или arm64).
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o /app/bot ./cmd/bot
RUN CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o /app/bot ./cmd/bot
# ---- Final Stage ----
# На этом этапе мы создаем финальный образ