FROM golang:1.22 AS build RUN apk --no-cache add gcc g++ make git WORKDIR /app COPY . . RUN GOOS=linux go build -ldflags="-s -w" -o ./bin/vault-wrap ./vault.go FROM alpine:3.20 WORKDIR /app RUN mkdir -p /usr/local/share/vault-wrap && mkdir -p /var/log/vault-wrap WORKDIR /usr/bin COPY --from=build /app/bin/vault-wrap /go/bin/vault-wrap COPY entrypoint.sh . ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]