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 capabilities
docker run --rm --name gitit -p 80:5001 tomzo/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 tomzo/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 tomzo/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 toGITIT_REPOSITORY
. Default isgitit.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. Defaultgitit
GIT_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]
MIT