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

Add Dockerfile to the repo to build wireguard-vanity-address #27

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

Conversation

richb-hanover
Copy link

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!

README.md Outdated
```
docker build -t wgvanity . # to build the container

docker run --rm wgvanity "string" # string for the "vanity address"
Copy link

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.

Copy link
Author

@richb-hanover richb-hanover Aug 4, 2022

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

Copy link

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.

Copy link
Author

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!

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