aides-repo-api/Dockerfile

21 lines
572 B
Text
Raw Normal View History

2024-12-04 11:46:42 +00:00
# Первый этап: сборка приложения
FROM golang:latest AS builder
WORKDIR /app
2024-12-04 11:46:42 +00:00
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o aides-repo-api ./cmd/aides-repo-api/main.go
2024-12-04 11:46:42 +00:00
# Второй этап: создание финального образа
FROM registry.altlinux.org/alt/alt:sisyphus
RUN \
apt-get update && \
apt-get install apt-repo-tools && \
rm -f /var/lib/apt/lists/*.* && \
rm -f /var/cache/apt/*.bin
COPY --from=builder /app/aides-repo-api /bin/aides-repo-api
ENTRYPOINT ["/bin/aides-repo-api"]