Skip to content

Commit

Permalink
Add docker container to build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbohal committed Oct 6, 2016
1 parent 3fde7e9 commit 433e6e6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,4 @@
node:
build: docker/mkdocs
volumes:
- .:/workspace
13 changes: 13 additions & 0 deletions docker/mkdocs/Dockerfile
@@ -0,0 +1,13 @@
FROM debian:latest

RUN apt-get update && apt-get install -y python-pip
RUN pip install mkdocs
RUN mkdir /workspace
RUN useradd -s /bin/bash docker-container-user


COPY ./init-container.sh /root/init-container.sh
WORKDIR /workspace



10 changes: 10 additions & 0 deletions docker/mkdocs/init-container.sh
@@ -0,0 +1,10 @@
#/usr/bin/env sh

# This script is to be executed when the docker container is started

# Set UID of user www-data on guest to match the UID of the user on the host machine
usermod -u $(stat -c "%u" $1) docker-container-user
# Set GID of group www-data on guest to match the GID of the users primary group on the host machine
groupmod -g $(stat -c "%g" $1) docker-container-user

chown -R docker-container-user /workspace

0 comments on commit 433e6e6

Please sign in to comment.