-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
35 lines (24 loc) · 1.17 KB
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
30
31
32
33
34
35
ARG ALPINE=alpine:3.9
FROM ${ALPINE} AS verify
RUN apk add --no-cache gnupg
ARG SERF_PGP_FINGERPRINT=91a6e7f85d05c65630bef18951852d87348ffc4c
ARG SERF_PLATFORM=linux_amd64
ARG SERF_VERSION=0.8.2
ADD https://keybase.io/hashicorp/pgp_keys.asc?fingerprint=${SERF_PGP_FINGERPRINT} /tmp/hashicorp.asc
ADD https://releases.hashicorp.com/serf/${SERF_VERSION}/serf_${SERF_VERSION}_SHA256SUMS /tmp
ADD https://releases.hashicorp.com/serf/${SERF_VERSION}/serf_${SERF_VERSION}_SHA256SUMS.sig /tmp
ADD https://releases.hashicorp.com/serf/${SERF_VERSION}/serf_${SERF_VERSION}_${SERF_PLATFORM}.zip /tmp
WORKDIR /tmp
RUN gpg --import hashicorp.asc
RUN gpg --verify serf_${SERF_VERSION}_SHA256SUMS.sig serf_${SERF_VERSION}_SHA256SUMS
RUN grep ${SERF_PLATFORM}.zip serf_${SERF_VERSION}_SHA256SUMS | sha256sum -cs
WORKDIR /opt/local/bin
RUN unzip /tmp/serf_${SERF_VERSION}_${SERF_PLATFORM}.zip
WORKDIR /opt/local/share/doc/serf
ADD https://raw.githubusercontent.com/hashicorp/serf/v${SERF_VERSION}/README.md .
ADD https://raw.githubusercontent.com/hashicorp/serf/v${SERF_VERSION}/CHANGELOG.md .
FROM scratch
COPY --from=verify /opt/local/ /opt/local/
ENV PATH /opt/local/bin
ENTRYPOINT ["serf"]
CMD ["help"]