-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 795 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM golang:1.17-alpine as builder
RUN apk add --update alpine-sdk
RUN apk update && apk add git openssh gcc musl-dev linux-headers
WORKDIR /build
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY / .
RUN mkdir -p /build/bin \
&& CGO_ENABLED=1 GOOS=linux go build -a -v -o /build/bin/vault-core . \
&& sha256sum -b /build/bin/vault-core > /build/bin/SHA256SUMS
FROM vault:latest
ARG always_upgrade
RUN echo ${always_upgrade} > /dev/null && apk update && apk upgrade
RUN apk add bash openssl jq
USER vault
WORKDIR /app
RUN mkdir -p /home/vault/plugins
COPY --from=builder /build/bin/vault-core /home/vault/plugins/vault-core
COPY --from=builder /build/bin/SHA256SUMS /home/vault/plugins/SHA256SUMS
RUN ls -la /home/vault/plugins
HEALTHCHECK CMD nc -zv 127.0.0.1 9200 || exit 1