-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
30 lines (27 loc) · 968 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
FROM alpine:3.12
ENV GOSLEEP_VERSION 1.0
RUN set -ex; \
\
apk add --no-cache --virtual .fetch-deps \
dpkg \
gnupg \
; \
\
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosleep "https://github.com/tianon/gosleep/releases/download/$GOSLEEP_VERSION/gosleep-$dpkgArch"; \
wget -O /usr/local/bin/gosleep.asc "https://github.com/tianon/gosleep/releases/download/$GOSLEEP_VERSION/gosleep-$dpkgArch.asc"; \
\
export GNUPGHOME="$(mktemp -d)"; \
# gpg: key BF357DD4: public key "Tianon Gravi <[email protected]>" imported
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosleep.asc /usr/local/bin/gosleep; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosleep.asc; \
\
chmod +x /usr/local/bin/gosleep; \
\
apk del --no-network .fetch-deps; \
\
gosleep --help; \
time gosleep --for 1s
CMD ["gosleep"]