-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
71 lines (63 loc) · 2.64 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM alpine:3.15
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
# Install ansible
RUN set -eux; \
apk add --no-cache ansible~=4.8.0; \
ansible --version
RUN apk add --no-cache ca-certificates
RUN set -eux; \
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux > /usr/local/bin/sops; \
chmod +x /usr/local/bin/sops; \
sha256sum /usr/local/bin/sops | grep '^53aec65e45f62a769ff24b7e5384f0c82d62668dd96ed56685f649da114b4dbb '; \
sops --version
RUN apk add --no-cache gnupg
RUN apk add --no-cache openssh-client
# Install step
RUN set -eux; \
STEP_VERSION=v0.27.5; \
case "$( uname -m )" in \
'x86') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_386.tar.gz"; \
SHA256=a4cb4cb893424780ffb4c8fee4ecf5b92e93c4c9b7ebd242631c272197dff2e0; \
;; \
'x86_64') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_amd64.tar.gz"; \
SHA256=2099be3d0cc7bc3559d771393378aa6c3e96908a929dccd570c8352e2440ad77; \
;; \
'armhf') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_armv6.tar.gz"; \
SHA256=97e8827c0ccfbf7779878f9a54b6fa72ba9aca4aead380d7a1cd85bebb04f365; \
;; \
'armv7l') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_armv7.tar.gz"; \
SHA256=c0adeba5d5c2bcf70edf5f626d48c3201c204fe671591c12005cf5b4d6e90349; \
;; \
'aarch64') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_arm64.tar.gz"; \
SHA256=f7f52300c3550bfb5a21a5fb2610dced6c3d24a008bec7e968987e7bc67f7ff4; \
;; \
'ppc64le') \
URL="https://github.com/smallstep/cli/releases/download/v0.27.5/step_linux_ppc64le.tar.gz"; \
SHA256=0ac0e38b2f0c3b3a075a00adba43e1a0bca1549d0e13293bd3205416cd993974; \
;; \
*) \
echo "Architecture not supported"; \
exit 1; \
;; \
esac; \
FILE=step.tar.gz; \
wget -q "$URL" -O "$FILE"; \
echo "$SHA256 $FILE" | sha256sum -c -; \
tar -xvf "$FILE" --no-same-owner --no-same-permissions; \
rm -f "$FILE"; \
mkdir -pv /usr/local/bin; \
BIN=$( find . -type f -name "step" | head -n1 ); \
mv -v "$BIN" /usr/local/bin/step; \
chmod +x /usr/local/bin/step; \
step version; \
:
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]