A Dockerfile to build image with Gitit Wiki.
Additional packages are installed:
ghc for haskell plugin supportgraphviz package for dot file supporttexlive for PDF export capabilitiesdocker run --rm --name gitit -p 80:5001 matthewddunlap/gitit
In real-world use you would mount existing git repository from docker host to the container.
Often the directory is owned by non-root user on host. This image can work with
cases like that. Gitit server runs as gitit user which has uid and gid
set to match with host-mounted directory.
Assuming ~/gitit.wiki has existing git repository. You can start server with
docker run --rm --name gitit -p 80:5001 -v ~/gitit.wiki:/gitit matthewddunlap/gitit
Image can be used this way to host an always running server or to preview wiki that you have locally.
Container runs ssh server by default so that you can push and pull to gitit repository.
Assuming that gitit.example.com is the address of the server running gitit container
started with something like:
docker run --rm --name gitit -p 80:5001 -p 2201:22 -v ~/gitit.wiki:/gitit matthewddunlap/gitit
To deal with custom port in remote address you can add
something like this in ~/.ssh/config
Host gitit.example.com
User gitit
Port 2201
Then add git remote with
git remote add gitit [email protected]:/gitit
And then you can push and pull to gitit remote like to any other repository.
Normally you do not need to set any of these values. You may need to ensure
that GITIT_CONF is set to your configuration path.
GITIT_CONF - Path to gitit configuration file. If not found then
it will be created. Can be full path or relative to GITIT_REPOSITORY.
Default is gitit.conf.GITIT_REPOSITORY - Path to git repository with gitit wiki. Default /gitit.SSH_AUTHORIZED_KEYS - Path to file with ssh authorized keys which will be allowed to
login over ssh and therefore push and pull with git. Default is /gitit/authorized_keys
meaning that you can keep authorized_keys in the git repository.GIT_COMMITTER_NAME - Committer name for git commits made through the web UI.
This is only used when creating a new git repository. Default gititGIT_COMMITTER_EMAIL - Committer email for git commits made through the web UI.
This is only used when creating a new git repository. Default [email protected].GITIT_USER - Default gitit.GITIT_GROUP - Default gitit.SSH_PORT - Default 22.GITIT_PORT - Default 5001.GITIT_THEME_ACTIVE - Activates specified Gitit Theme in GITIT_CONF and manipulates
static and templates directories in GITIT_REPOSITORY. By default, a flat theme
is installed and can be actvated by setting value to flat. Default default.MIT
Content type
Image
Digest
Size
375.4 MB
Last updated
almost 6 years ago
docker pull matthewddunlap/gitit