0xtrr / nostr-tool

A simple CLI to send nostr events
MIT License
60 stars 18 forks source link

add Dockerfile #25

Closed bijeebuss closed 1 year ago

bijeebuss commented 1 year ago

I want to use this for something I'm working on but I don't want to install rust on my machine. This Dockerfile allows somebody to build the project with docker build -t nostr-tool . and run it with docker run nostr-tool nostr-tool -r wss://nostr.oxtr.dev text-note -c "Hello World" If you have a docker account you could publish the image so that anybody could run it without cloning the repo or installing rust with almost the same command.

bijeebuss commented 1 year ago

I could just download the binary but having the cli in docker hub would make it easier to use as a composable app

0xtrr commented 1 year ago

Thanks for the contribution @bijeebuss, LGTM! Can you also add docker instructions to the readme under the Install section?

0xtrr commented 1 year ago

I'll also look into setting up an official docker image for nostr-tool on Dockerhub

bijeebuss commented 1 year ago

If you are interested I can add my .devcontainer in another PR. This would allow anybody to run the project directly from github by clicking "open in codespaces" or do development in a container without needing to install rust on their machine.

0xtrr commented 1 year ago

Cool, tbh I've never heard about .devcontainer and haven't used codespaces myself but I'm open to merge it if this is something that could be useful for someone.