A Docker image for running an instance of hackage-server
for
testing purposes. It includes an "admin" user (created with password "admin"),
that has been added to the "uploaders" group.
hackage-server
is built from the hackage-deployment-2020-05-03
tag of the hackage-server Git repository.
The hackage-server
documentation claims that the server
can be cleanly stopped using ctrl-c, but (since 2016, and as at December
2021) this doesn't always seem to be the case.
The suggested command-line invocation for running a container is:
docker run --rm -it --net=host phlummox/hackage-server:latest \
hackage-server run --static-dir=datafiles --base-uri=http://localhost:8080/
If you get errors about lock-files, try:
docker run --rm -it --net=host phlummox/hackage-server:latest \
bash -c 'rm -f state/db/*/*/*.lock && rm -f state/db/*/*.lock && hackage-server run --static-dir=datafiles --base-uri=http://localhost:8080/'