- target multi-platform for gollum by
docker buildx
- add gollum-auth to do the basic authentication
- use rackup to start
- a customized collapsable sidebar
the modified gollum files
- add activemodel to
gollum.gemspec
as the gollum-auth need it - in Dockerfile, install the self-build gem file
gollum-auth-0.7.1.gem
, as there is conflict issue when using docker build gollum with gollum-auth installed from gem sources
the http basic authentication middleware for gollum
- change the references to the latest gems, as it has conflicts with gollum
use docker to build the gem file:
docker build -t gollum-auth .
copy the file out:
docker cp gollum-auth:/pkg/gollum-auth-0.7.1.gem ~/
the customized js & css, and config.ru for rack, including the enhanced NiceTOC as sidebar that can be collapsed
docker context ls
docker buildx ls
docker buildx create --use --name mybuilder #node-amd64
docker buildx inspect mybuilder --bootstrap
- pull the latest gollum and use the modified files to override them
- build
- push to docker hub:
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 --push -t balder1840/gollum:v5.3.0 .
- or output as local image:
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 --output=type=image -t balder1840/gollum:v5.3.0 .
- push to docker hub:
- create a folder let's say ~/wiki
- move config.ru, costum.css, custom.js to ~/wiki and use git to check in
- run
docker run -d \
--name gollum \
-p 8080:4567 \
-e GOLLUM_AUTHOR_USERNAME=xxx \
-e [email protected] \
-v ~/wiki:/wiki balder1840/gollum:tagname \
--host 0.0.0.0 \
--port 4567
or
docker run -d \
--name gollum \
-p 8080:4567 \
-e GOLLUM_AUTHOR_USERNAME=xxx \
-e [email protected] \
-v ~/wiki:/wiki \
-v ~/YourConfig.ru:/config.ru \
balder1840/gollum:tagname \
/config.ru \
--host 0.0.0.0 \
--port 4567
you can find a image here at docker hub