-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 796 Bytes
/
Dockerfile
File metadata and controls
24 lines (17 loc) · 796 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
FROM alpine AS build
LABEL maintainer="Kazushi (Jam) Marukawa <jam@pobox.com>"
ENV KINDLEGEN=kindlegen_linux_2.6_i386_v2_9.tar.gz
ENV KINDLEGEN_SHA256="9828db5a2c8970d487ada2caa91a3b6403210d5d183a7e3849b1b206ff042296"
RUN apk --update add ca-certificates curl tar && rm -rf /var/cache/apk/*
RUN curl -L http://kindlegen.s3.amazonaws.com/${KINDLEGEN} -o ${KINDLEGEN} && \
echo "${KINDLEGEN_SHA256} ${KINDLEGEN}" | sha256sum -c - && \
mkdir -p /opt/kindlegen && \
tar zxf ${KINDLEGEN} -C /opt/kindlegen && \
rm ${KINDLEGEN}
RUN touch /tmp/passwd /tmp/group
FROM scratch
COPY --from=build /tmp/passwd /etc/passwd
COPY --from=build /tmp/group /etc/group
COPY --from=build /opt/kindlegen/kindlegen /opt/kindlegen/kindlegen
WORKDIR /work
ENTRYPOINT ["/opt/kindlegen/kindlegen"]