21 lines
No EOL
572 B
Docker
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"] |