2024-03-31 00:39:00 +00:00
|
|
|
# Build image
|
2023-08-09 07:02:07 +00:00
|
|
|
FROM golang:1.21-alpine AS build
|
2023-01-16 00:52:10 +00:00
|
|
|
|
|
|
|
ENV GOPRIVATE coopcloud.tech
|
|
|
|
|
2023-10-09 22:50:43 +00:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
make \
|
|
|
|
musl-dev
|
|
|
|
|
2023-01-16 00:52:10 +00:00
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 make build
|
|
|
|
|
2024-03-31 00:39:00 +00:00
|
|
|
# Release image ("slim")
|
|
|
|
FROM alpine:3.19.1
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
openssh
|
|
|
|
|
|
|
|
RUN update-ca-certificates
|
2023-01-16 00:52:10 +00:00
|
|
|
|
|
|
|
COPY --from=build /app/abra /abra
|
|
|
|
|
|
|
|
ENTRYPOINT ["/abra"]
|