12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- # Pelican with asciidoc support Dockerfile
- # Clone from minimal linux alpine image
- FROM alpine
- MAINTAINER Lertsenem <lertsenem@lertsenem.com>
- EXPOSE 22
- EXPOSE 80
- # System installations
- RUN apk update \
- && apk add \
- asciidoc \
- bash \
- git \
- make \
- nginx \
- openssh \
- python \
- python3 \
- py-pip \
- supervisor \
- && rm -rf /var/cache/apk/* \
- && adduser -h /srv/git \
- -s /bin/bash \
- -G nginx \
- -D \
- pelican \
- && passwd -u pelican \
- && rm /etc/supervisord.conf \
- && rm /etc/ssh/sshd_config \
- && rm /etc/motd \
- && rm /etc/nginx/nginx.conf \
- && rm -r /etc/nginx/conf.d/ \
- && ssh-keygen -A \
- && mkdir /srv/www \
- && chmod 775 /srv/www \
- && chown pelican:nginx /srv/www
- COPY run.sh /run.sh
- COPY nginx.conf /etc/nginx/nginx.conf
- COPY supervisord.conf /etc/supervisord.conf
- COPY sshd.conf /etc/ssh/sshd_config
- # Pelican installation
- RUN pip install html5lib \
- pelican \
- markdown
- # Pelican parameters
- USER pelican
- RUN mkdir -p /srv/git/.ssh \
- && mkdir -p /srv/git/blog.git \
- && ln -s blog.git /srv/git/blog \
- && git init --bare /srv/git/blog.git \
- && touch /srv/git/.ssh/authorized_keys \
- && chmod 700 /srv/git/.ssh \
- && chmod 640 /srv/git/.ssh/authorized_keys
- COPY git.post-receive /srv/git/blog.git/hooks/post-receive
- USER root
- CMD /run.sh
|