-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 764 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (19 loc) · 764 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
FROM alpine:3.10.3@sha256:e4355b66995c96b4b468159fc5c7e3540fcef961189ca13fee877798649f531a AS build
ARG CHEAT_VERSION=4.2.0
RUN apk add curl gzip \
&& curl \
-L \
https://github.com/cheat/cheat/releases/download/$CHEAT_VERSION/cheat-linux-amd64.gz \
-o cheat.gz \
&& gunzip cheat \
&& chmod a+x cheat
RUN mkdir --parents /v/workdir /v/personal /usr/local/share/cheat/builtin
FROM scratch
COPY --from=build v/ /v/
COPY --from=build cheat /usr/local/bin/cheat
COPY src/conf.yml /usr/local/etc/cheat/conf.yml
COPY src/docker-cheat /usr/local/share/cheat/builtin/
COPY cheatsheets/ /usr/local/share/cheat/community/
ENV CHEAT_CONFIG_PATH="/usr/local/etc/cheat/conf.yml"
WORKDIR /v/workdir
ENTRYPOINT ["/usr/local/bin/cheat"]