Git Product home page Git Product logo

docker-wiki's Introduction

Run a WIKI website from any source git repository of markdown files and Gollum git-based wiki configuration files like templates, media and css stylesheets.

wiki website powered by gollum

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.

how to run the wiki in 3 steps

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.

Step 1 | Dockerfile

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

Step 2 | docker build the wiki

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.

Step 3 docker run the wiki

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.

local wiki development | howto

If you want to extend or change the Docker image you can develop it locally using these commands.

local docker build

git clone https://github.com/devops4me/docker-wiki
cd docker-wiki
docker build --no-cache --rm --tag img.wiki .

docker-wiki's People

Contributors

apolloakora avatar devops4me avatar

Watchers

 avatar  avatar  avatar

Forkers

jtong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.