-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (28 loc) · 896 Bytes
/
Dockerfile
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
36
37
38
39
40
# syntax=docker/dockerfile:1.4
FROM alpine:latest as downloader
ARG SOPS_V="3.7.3"
ARG AGE_V="1.1.1"
ARG PLATFORM="amd64"
WORKDIR /tmp
RUN apk add curl tar
RUN <<EOT
curl -L "https://github.com/getsops/sops/releases/download/v${SOPS_V}/sops-v${SOPS_V}.linux.${PLATFORM}" -o ./sops &&
chmod +x ./sops
EOT
RUN <<EOT
set -e
# AGE KEYGEN
curl -L "https://github.com/FiloSottile/age/releases/download/v${AGE_V}/age-v${AGE_V}-linux-${PLATFORM}.tar.gz" -o ./age.tar.gz &&
tar -xzvf ./age.tar.gz "age/age-keygen" --strip-components 1
rm ./age.tar.gz
chmod +x ./age-keygen
EOT
FROM bash:latest
LABEL maintainer="Mathieu Bouzard <[email protected]>"
ENV SOPS_AGE_KEY_FILE=/home/age/keys.txt
COPY --from=downloader /tmp ./
COPY entrypoint.sh .
VOLUME /home/age
EXPOSE 5000
ENTRYPOINT ["bash", "entrypoint.sh"]
CMD ["keyservice", "--verbose", "--addr", "0.0.0.0:5000", "--network", "tcp"]