aides-repo-api/Dockerfile
Maxim Slipenko 733cebfd81 feat: add database (#7)
Reviewed-on: https://code.alt-gnome.ru/aides-infra/aides-repo-api/pulls/7
Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
Co-committed-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
2024-12-14 08:35:45 +00:00

21 lines
No EOL
572 B
Docker

# Первый этап: сборка приложения
FROM golang:latest AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o aides-repo-api ./cmd/aides-repo-api/main.go
# Второй этап: создание финального образа
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"]