octobus/mercurial-mirror
Mercurial repositories mirroring based on mercurial-http-server
197
This image is based on mercurial-http-server
and adds basic utilities to
mirror some upstream repositories.
It can connect to upstream repositories over HTTP(S) and SSH (see below for SSH configuration).
This is exactly as for mercurial-http-server, from which this image is derived.
These are specified in the conf/mirror_repos.txt
file. You can customize it
as other files in this directory, see
mercurial-http-server
Assuming you have a container named hg-mirror
running this image, like this:
docker exec -it hg-mirror /usr/bin/python check_repo.py
This applies both to the case where you have new upstream repositories to mirror or to refresh the server's repositories with new changeset from upstream.
It is typical usage to run this command from a crontab or a systemd timer or whatever periodic job runner is available. In other words, the scheduling itself is not provided by this image.
In some cases, it is useful to mirror upstream repositories that are
accessible through SSH only, but that requires populating the .ssh
directory
with config
and keys.
In that case, the simplest is probably to make your own dependent Docker image with a Dockerfile along the lines of
FROM octobus/mercurial-mirror:latest
USER root
COPY ssh_dir /home/mercurial/.ssh
RUN chown -R mercurial:mercurial /home/mercurial/.ssh && \
chmod -R o-w /home/mercurial/.ssh && \
chmod -R g-w /home/mercurial/.ssh
USER mercurial
Nothing special, see the documentation of mercurial-http-server
docker pull octobus/mercurial-mirror