-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add Dockerfile to the repo to build wireguard-vanity-address #27
base: master
Are you sure you want to change the base?
Conversation
…one. (Containers hang around forever if you don't.)
README.md
Outdated
``` | ||
docker build -t wgvanity . # to build the container | ||
|
||
docker run --rm wgvanity "string" # string for the "vanity address" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you run the container with -it
flags you'll be able to stop it with Ctrl^C as usual, no need to open a new terminal.
Might be a bit easier approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the -it
doesn't do it. (I thought of that.) Ctl-C's seem to get swallowed...
docker run --rm -it wgvanity Rich
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for assuming you didn't try that and not testing locally, my bad! I was able to reproduce now.
It seems the issue is related to this SO post. Running the container like that:
docker run --rm --init -it wgvanity Rich
makes it work for me. But it'd be probably better to "add explicit signal handling" to the app for SIGTERM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bingo! That does the trick. I just updated the PR. THANKS!
For whatever reason, I had trouble building
wireguard-vanity-address
on macOS, so I had to spin up one of my Linux VMs to run it. I love this program and blogged about it.I read Jonathan Bergknoff’s Run More Stuff in Docker that made a lot of sense to me. (The magic of using Docker is that once you’ve created the instance, all the tool and dependency versions remain the same. It’s easy then to hand the Dockerfile to a colleague who can build an identical development environment in a few minutes. It also avoids cluttering my daily-driver laptop with multiple versions of Node, npm, Go, Python, rust, and any number of little-used tooling – they’re all encapsulated in the Docker container.)
So I offer up this Dockerfile for your readers. Thanks again for writing
wireguard-vanity-address
!