-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile
37 lines (31 loc) · 1.14 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
ARG BASE_IMAGE=alpine
ARG ALPINE_VERSION=3.10
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
LABEL org.label-schema.schema-version="1.0.0" \
maintainer="[email protected]" \
org.label-schema.vcs-description="Alpline mkdocs" \
org.label-schema.docker.cmd="docker exec " \
image-size="71.6MB" \
ram-usage="13.2MB to 70MB" \
cpu-usage="Low"
RUN apk add --update python3 libcap && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
echo "**** install pip ****" && \
/usr/bin/python3 -m ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
pip install mkdocs click-man && \
mkdir /opt/www && \
addgroup -g 101 -S mkdocs && \
adduser -S -D -H -u 101 -h /opt/www -s /sbin/nologin -G mkdocs -g mkdocs mkdocs && \
chown -R mkdocs:mkdocs /opt/www && \
setcap 'cap_net_bind_service=+ep' /usr/bin/mkdocs && \
rm -rf /tmp/* /var/cache/apk/*
VOLUME /var/mkdocs
USER mkdocs
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /var/mkdocs
EXPOSE 8000
CMD ["mkdocs"]