Dockerfile 983 Bytes
Newer Older
1 2
FROM alpine:latest
MAINTAINER Michał "rysiek" Woźniak <rysiek@hackerspace.pl>
Hubert Dąbrowski's avatar
Hubert Dąbrowski committed
3 4
MAINTAINER Hubert Dąbrowski <h@dabrow.org>

5
ENV ACME_STATE_DIR="/data"
6
ENV ACME_HOOKS_DIR="/usr/lib/acme/hooks/"
7
ARG BRANCH_OR_TAG="v0.2.1"
Hubert Dąbrowski's avatar
Hubert Dąbrowski committed
8

9
# TLS root certs needed for, well, TLS
10
RUN apk add ca-certificates && update-ca-certificates
11
RUN apk add git libcap-dev make go
12

13 14 15
RUN git clone --single-branch --branch "${BRANCH_OR_TAG}" https://github.com/hlandau/acmetool.git /opt/acmetool/
RUN go get -u github.com/hlandau/acme/cmd/acmetool
RUN cd /opt/acmetool && go build -v
Hubert Dąbrowski's avatar
Hubert Dąbrowski committed
16

17 18 19 20 21
#
# install additional packages
ARG INSTALL_PACKAGES=""
RUN if [ "$INSTALL_PACKAGES" != "" ]; then \
        apk update && \
Michał Woźniak's avatar
Michał Woźniak committed
22
        apk add $INSTALL_PACKAGES; \
23 24 25 26 27 28 29
    fi

#
# ACME_STATE_DIR is: /data
# hooks directory is the default: /usr/lib/acme/hooks/
# more on hooks: https://github.com/hlandau/acme/blob/master/_doc/SCHEMA.md#hooks
VOLUME ["/data", "/usr/lib/acme/hooks/"]
Hubert Dąbrowski's avatar
Hubert Dąbrowski committed
30

31
ENTRYPOINT ["/opt/acmetool/acmetool"]
Hubert Dąbrowski's avatar
Hubert Dąbrowski committed
32
CMD ["--help"]