-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile.Linux
More file actions
30 lines (24 loc) · 1.07 KB
/
Containerfile.Linux
File metadata and controls
30 lines (24 loc) · 1.07 KB
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 docker.io/library/alpine:latest AS builder
LABEL maintainer="Frans-Jan van Steenbeek <frans-jan@van-steenbeek.net>"
# Set up filesystem
RUN mkdir -p /usr/local/bin
RUN mkdir -p /usr/local/etc
RUN mkdir -p /usr/local/share/cayman/CA
RUN apk add openssl lighttpd
RUN touch /var/www/localhost/htdocs/index.html
COPY cayman /usr/local/bin/
COPY cayman.conf openssl.conf /usr/local/etc/
COPY lighttpd.conf /etc/lighttpd/
COPY handler.sh /usr/local/bin/
# Adjust cayman.conf
RUN sed -i 's|^PDIR=.*$|PDIR="/usr/local/share/cayman/CA/"|' /usr/local/etc/cayman.conf && \
sed -i 's|^CONF=.*$|CONF="/usr/local/etc/openssl.conf"|' /usr/local/etc/cayman.conf && \
echo >> /usr/local/etc/cayman.conf && \
echo "# Persistent overrides can be put here:" >> /usr/local/etc/cayman.conf && \
echo "[ -r /usr/local/share/cayman/cayman.conf ] && source /usr/local/share/cayman/cayman.conf" >> /usr/local/etc/cayman.conf
# Make /usr/local/share/cayman a volume
VOLUME /usr/local/share/cayman
# Declare which ports we serve
EXPOSE 80 8080
# Run Lighttpd
CMD /usr/sbin/lighttpd -Df /etc/lighttpd/lighttpd.conf