Adds a Dockerfile
This PR contains:
- A
Dockerfilebased on alpine linux. - Usage notes in README.
Testing
You can test the container build locally with the following commands:
docker build -t kingraph-test .
docker run --rm kingraph-test
This should show the output of kingraph --help.
Additional Setup
Ideally the author of this project would set up an automated docker build to act as an "official" docker image for this project. The instructions for how to set this up are here: https://docs.docker.com/docker-hub/builds/
After this is set up the documentation will need updating depending on the dockerhub account and image registry name.
@rstacruz have you had a chance to review this?
Thanks @nicksantamaria - do I need to push this to docker hub?
Hi @rstacruz - I recommend setting up automated builds in Dockerhub. That will remove the need for you to manually build and push the image every time there is an update.
Instructions for setting up builds in dockerhub here - https://docs.docker.com/docker-hub/builds/
@nicksantamaria @rstacruz (or anyone else interested in the future) FYI I've integrated this into my fork (also see #18), with a fix in https://github.com/vorburger/kingraph/commit/8bbdfe4fac2fbf002ce4f75378c8f7092d703788, and some further README doc.
FYI https://github.com/vorburger/kingraph/pkgs/container/kingraph (and https://github.com/vorburger/kingraph/commit/c425c3eaf0df2788638b29ca991bbc92b063ffd4)
https://github.com/vorburger/kingraph/commit/3454c06e4224ef5acec5282af0de670ace223325 actually fixes the Dockerfile. As-is here in this PR it's actually broken - it only works if used from within this repo (because the /data volume contains the code as well - but should not.) https://github.com/vorburger/kingraph/commit/9610e66c5d3b2031d4784d12294d803c7252a080 adds a test about it (as-is here that test would not pass).