Run a dockerized WIKI website from a git repository of markdown files with this container
1.9K
Gollum is a Ruby-based wiki with a Git back-end. It powers the Github wiki so you can be confident that it is robust and extremely simple to use.
All you need to do is docker build and run using the base docker image devops4me/wiki and provide the URL of the git repository that contains the WIKI content like https://github.com/apolloakora/devops-wiki.
The devops-wiki github repository is a git-based wiki with markdown content. Let's use it alongside the devops4me/wiki dockerhub image to create a wiki website.
The first step is to place this Dockerfile at the root of the wiki's content repository so that it can copy the wiki content into the docker machine.
FROM devops4me/wiki:latest
# --->
# ---> As the gollum user create wiki.dir from a clone
# ---> of the wiki content repository and set it as the
# ---> work directory.
# --->
# ---> Pass the WIKI_CONTENT_URL as a build argument.
# --->
USER gollum
ARG WIKI_CONTENT_URL
RUN git clone $WIKI_CONTENT_URL /var/opt/gollum/wiki.dir
WORKDIR /var/opt/gollum/wiki.dir
To build the Dockerfile you execute the docker build command with a --build-arg called WIKI_CONTENT_URL that specifies the git location url of the wiki's content.
docker build \
--no-cache \
--rm \
--build-arg WIKI_CONTENT_URL=https://github.com/apolloakora/devops-wiki.git \
--tag img.wiki \
.
Beware there is a period (dot) on the final line of the build command.
docker run \
--detach \
--name vm.wiki \
--publish 4567:4567 \
img.wiki
docker logs vm.wiki
Now the wiki is running in a docker machine named vm.wiki in your environment.
Access it with http://localhost:4567 after a few seconds.
If you want to extend or change the Docker image you can develop it locally using these commands.
git clone https://github.com/devops4me/docker-wiki
cd docker-wiki
docker build --no-cache --rm --tag img.wiki .
Content type
Image
Digest
Size
374.2 MB
Last updated
over 6 years ago
docker pull devops4me/wiki