2024-02-18 13:51:06 +01:00
|
|
|
FROM docker.io/golang:1.22.0-alpine AS build
|
2024-02-18 13:44:01 +01:00
|
|
|
WORKDIR /src
|
|
|
|
# create a cache
|
|
|
|
COPY go.* /src/
|
|
|
|
RUN go mod download
|
|
|
|
# compile
|
|
|
|
COPY * /src/
|
|
|
|
RUN CGO_ENABLED=0 go build -o /scaleway-delete-image-plugin .
|
|
|
|
|
|
|
|
FROM alpine:3.19
|
|
|
|
RUN apk -Uuv add curl ca-certificates
|
2024-02-18 13:49:37 +01:00
|
|
|
COPY --from=build /scaleway-delete-image-plugin /scaleway-delete-image-plugin
|
2024-02-18 13:44:01 +01:00
|
|
|
ENTRYPOINT /scaleway-delete-image-plugin
|