2024-07-10 16:38:47 +03:00
|
|
|
#FROM golang:1.22 AS build
|
|
|
|
FROM golang:alpine3.20 AS build
|
2024-07-09 15:18:44 +03:00
|
|
|
|
2024-07-10 16:38:47 +03:00
|
|
|
RUN apk --no-cache add gcc g++ make git
|
2024-07-10 13:24:42 +03:00
|
|
|
WORKDIR /app
|
2024-07-09 15:18:44 +03:00
|
|
|
COPY . .
|
2024-07-10 16:38:47 +03:00
|
|
|
RUN go get net/netip
|
|
|
|
RUN go get ./...
|
2024-07-10 12:55:19 +03:00
|
|
|
|
2024-07-09 15:18:44 +03:00
|
|
|
RUN GOOS=linux go build -ldflags="-s -w" -o ./bin/vault-wrap ./vault.go
|
|
|
|
FROM alpine:3.20
|
2024-07-10 16:38:47 +03:00
|
|
|
RUN apk add tzdata
|
2024-07-09 15:18:44 +03:00
|
|
|
WORKDIR /usr/bin
|
2024-07-10 16:38:47 +03:00
|
|
|
COPY --from=build /app/bin /go/bin
|
2024-07-09 16:50:26 +03:00
|
|
|
|
2024-07-10 16:38:47 +03:00
|
|
|
COPY entrypoint.sh .
|
2024-07-09 15:18:44 +03:00
|
|
|
|
2024-07-10 16:38:47 +03:00
|
|
|
# COPY cronjobs /etc/crontabs/root
|
2024-07-09 15:18:44 +03:00
|
|
|
|
2024-07-10 16:38:47 +03:00
|
|
|
# start crond with log level 8 in foreground, output to stderr
|
|
|
|
# CMD ["crond", "-f", "-d", "8"]
|
2024-07-09 16:28:45 +03:00
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]
|
|
|
|
|