forked from ankitrgadiya/docker-ikiwiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (37 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
45 lines (37 loc) · 1.02 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM debian:latest
LABEL maintainer="andrew@abopen.com"
RUN apt-get update \
&& apt-get install -y \
nginx \
fcgiwrap \
perlmagick \
python \
ikiwiki \
libxml-writer-perl \
xapian-omega \
libsearch-xapian-perl \
libdigest-sha-perl \
libhtml-scrubber-perl \
libxml-writer-perl \
openssh-server \
supervisor \
&& rm -rf /var/lib/apt/lists/*
# Activate the www-data account
RUN mkdir /var/www/.ssh \
&& ln -s /wiki/authorized_keys /var/www/.ssh/authorized_keys \
&& chsh -s /bin/bash www-data
# Setup SSH
RUN mkdir /var/run/sshd \
&& chmod 700 /var/run/sshd \
&& sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
# Setup the Ikiwiki directory
RUN mkdir /wiki \
&& chown www-data: /wiki
# Copy configurations
COPY config/nginx.conf /etc/nginx/sites-available/default
COPY config/ikiwiki_supervisord.conf /etc/supervisor/conf.d/
COPY templates/* /wiki/templates/
COPY script/* /opt/bin/
VOLUME ["/wiki"]
EXPOSE 22 80
CMD ["bash", "/opt/bin/docker-entrypoint.sh"]