2024-07-10 13:24:42 +03:00
|
|
|
FROM golang:1.22 AS build
|
2024-07-10 16:15:17 +03:00
|
|
|
RUN apk --no-cache add gcc g++ make git
|
2024-07-09 15:18:44 +03:00
|
|
|
|
2024-07-10 13:24:42 +03:00
|
|
|
WORKDIR /app
|
2024-07-09 15:18:44 +03:00
|
|
|
|
|
|
|
COPY . .
|
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
|
2024-07-10 12:55:19 +03:00
|
|
|
|
2024-07-09 15:18:44 +03:00
|
|
|
FROM alpine:3.20
|
2024-07-10 13:24:42 +03:00
|
|
|
|
|
|
|
WORKDIR /app
|
2024-07-09 16:50:26 +03:00
|
|
|
|
|
|
|
RUN mkdir -p /usr/local/share/vault-wrap && mkdir -p /var/log/vault-wrap
|
|
|
|
|
2024-07-09 15:18:44 +03:00
|
|
|
WORKDIR /usr/bin
|
2024-07-09 16:50:26 +03:00
|
|
|
|
2024-07-10 15:12:03 +03:00
|
|
|
COPY --from=build /app/bin/vault-wrap /go/bin/vault-wrap
|
2024-07-09 15:18:44 +03:00
|
|
|
|
|
|
|
|
2024-07-09 16:28:45 +03:00
|
|
|
COPY entrypoint.sh .
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]
|
|
|
|
|