Make builder cancellable with Ctrl-C?
Boscop opened this issue · 1 comments
Thanks for making this great docker image, it's very useful :)
(This is the only Rust musl builder image I found that is available for nightly.)
I'm using it like this to avoid redownloading & recompiling all deps on every build and to write the build output as the intended user:
docker run --rm -t -e CARGO_HOME=/.cargo -v $CARGO_HOME:/.cargo -v $PWD:/volume -u `id -u $USER`:`id -g $USER` clux/muslrust:nightly cargo build --release "$@"
(Btw, I think it would be useful to add an example like this to the Readme, for people who want to reuse the cargo cache.)
It works well, I just wish that the docker image would terminate when pressing Ctrl-C because when it gets invoked accidentally with the wrong args, I'd like to terminate it early with Ctrl-C, but currently it just keeps running.
Would it be possible to make this work? :)
heyhey, thank you!
That invocation looks sensible!
I think if you add the interactive flag (-i
) to the docker run command it should respect Ctrl-C.