Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Add Docker support #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pataquets
Copy link

@pataquets pataquets commented Jul 18, 2020

Setting the ball rolling, since community feedback is desired.
As of now, just download deps and add code. Entrypoint calls main run command and, if no further command line args are provided, defaults to starting a daemon (in foreground as per Docker requirement). I'm not a NodeJS developer, so feedback is much appreciated.
Add Dockerfile to enable image building.
Using the official NodeJS image, latest LTS tag. More info at https://hub.docker.com/_/node/
Note: Readme states that there is an issue preventing NodeJS 14 from working, but the issue is closed. I went for latest LTS (1412 as per NodeJS Docker Hub page). Maybe the readme notice is no longer valid?

Build:

$ docker build -t hyperdrive-daemon .

Run:

$ docker run --rm -it -p 3101:3101 hyperdrive-daemon [options...]

FYI, there's a still quicker to test, already built image on my Docker Hub. Test it by running:

$ docker run --rm -it -p 3101:3101 pataquets/hyperdrive-daemon-src [options...]

Using --rm instead of -d makes the container not go background and it to be deleted after stop. Should stop by CTRL+C'ing it.

FUSE packages and OS support is still not present, but it is feasible under Docker. I guess it's the next thing to add, but merging can provide a base image (with hopefully an Automated Build) in the meantime for others to base on and contribute and improve further. But that can be dealt with in different issues later.

@SvenDowideit
Copy link

instead of using a Docker Hub automated build, I've started trying out using docker buildx from a GitHub action - that way its possible to get properly formed multi-arch images without too much effort.

see https://github.com/SvenDowideit/ruuvi-prometheus/blob/master/.github/workflows/dockerpublish.yml for where I got to :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants