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

Docker #16

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

Docker #16

wants to merge 2 commits into from

Conversation

nikolashermann
Copy link

This adds a simple dockerfile based on the install.sh.

I have pushed the image to docker hub for testing purposes, you can find it here: https://hub.docker.com/r/nikolashermann/xmr-node-proxy/

@Snipa22
Copy link
Owner

Snipa22 commented Aug 1, 2017

If memory serves right, the ubuntu:16.04 image loads everything as root. The proxy certainly doesn't need root access to run, can you add a USER parameter to this to lock out the proxy to run as a non-root user, or confirm this doesn't, and I'll pull it in.

@pslobo
Copy link

pslobo commented Sep 11, 2017

Yes, that's right @Snipa22 and @nikolashermann, no need to run this as root. If it helps, you can have a look at my Dockerfile here (still a little messy, I'll clean up and add a new commit soon).

A few more pointers worth noting:

  • Keep the image as small as possible by adding fewer layers. Grouping RUN commands together will help and a little apt-get house keeping too;
  • No need to expose those ports. If the user changes the config and uses other ports then those are exposed needlessly;
  • Don't copy config-example.json to config.json. Let the user provide their own. Example usage

With regard to the documentation, I'd advise you update to the new syntax. Although that remains backward compatible, I imagine it's just a matter of time before that syntax stops working. So, your instructions should therefore read:

docker image build --force-rm -t xmr-node-proxy . and docker container run -d -v $(pwd)/config.json:/app/config.json -p PORT:PORT xmr-node-proxy.

Alternatively, users can also pull the image from Docker without needing to build it. Personally, I'll be using mine for my proxies and I'll do my best to maintain it as new versions of the proxy are released, but I also agree that users could benefit from this Dockerfile and instructions on how to build their own if they are so inclined.

@infernix infernix mentioned this pull request Apr 11, 2018
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.

3 participants