Nethence NEWDOC OLDDOC Lab Webmail Your IP BBDock  

Setting up Gollum within a docker container

Based on custom/ubuntu

Run the container that will serve Gollum,

netstat -an --inet --inet6 | grep LISTEN
docker ps -a | grep $app
docker run -d --name $app -h $app \
        -p 80XX:8080 -p 84XX:8443 \
        --volume /data/$app:/$app \
docker ps -a | grep $app
docker logs $app

Enter the container,

docker exec -ti $app bash


Install the needed packages as root,

apt -y install ruby ruby-dev zlib1g-dbg zlib1g-dev libicu-dev
apt -y install make build-essential
gem install gollum
gem install bundle

then as user (you can stay root if it’s a container),

cd ~/
apt -y install git
#git clone
git clone
cd gollum/
bundle install

GIT setup to handle the documentation

Setup the TERM & EDITOR vars for versioning comments,

export TERM=xterm
export EDITOR=vi
#update-alternatives --config editor

Setup your git profile,

#git config --global "xxx@xxx"
#git config --global "xxx"
git config --global ""
git config --global "ISA support"

Create a local repository,

cd ~/
git init doc
cd doc/
git add
git commit
git status

Setup the user account to have the same UID and GID as the docker host user, so the doc can be edited both ways, from the docker host+git commit or tru the Gousermexample.come,

groupadd -g 1002 buyin
useradd -m -u 1002 -g 1002 buyin
chmod 755 /root/
su - buyin
cd /root/doc/
bundle exec bin/gollum ../doc --port 8082

Ready to go

Backup the container as an image and allow to re-use it afterwards to re-launch other containers,

docker commit -p gollumprod gollum.ready.`date +%s`

Start the daemon,

set -e
cd gollum/
#bundle exec bin/gollum --help
bundle exec bin/gollum ../doc --config config.rb

Check with a web browser,

http://SERVER ADDRESS:4567/

and eventually enable a reverse-proxy against it.