Skip to content

Instantly share code, notes, and snippets.

@saladinjake
Forked from clcollins/Dockerfile
Created May 15, 2019 15:17
Show Gist options
  • Save saladinjake/bf08f77578f33dc26fdd73389ade70f8 to your computer and use it in GitHub Desktop.
Save saladinjake/bf08f77578f33dc26fdd73389ade70f8 to your computer and use it in GitHub Desktop.
mkdocs in a Docker container
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name localhost;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
FROM ubuntu:17.10
MAINTAINER Chris Collins <[email protected]>
ENV PKGS python python-pip nginx runit
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y $PKGS
RUN pip install mkdocs
ADD default /etc/nginx/sites-enabled/default
RUN mkdir -p /etc/service/nginx
ADD nginx.run /etc/service/nginx/run
RUN chmod -R a+x /etc/service/nginx
RUN mkdir -p /etc/service/mkdocs
ADD mkdocs.run /etc/service/mkdocs/run
RUN chmod -R a+x /etc/service/mkdocs
EXPOSE 80
#!/bin/bash
cd /mnt
mkdocs build --clean
exec mkdocs serve
#!/bin/bash
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment