tag:blogger.com,1999:blog-34374221.post3068697835247388925..comments2024-03-03T07:35:45.002+01:00Comments on geekAbyte: How to cross compile Rust on MacOs and target Linux using Docker containerdadehttp://www.blogger.com/profile/01934137473204182228noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-34374221.post-77235596687005161852021-02-20T08:03:20.902+01:002021-02-20T08:03:20.902+01:00Hi
I'm just learning docker so your post was ...Hi<br /><br />I'm just learning docker so your post was very useful to me. Thanks.<br /><br />One small improvement, I think, is to add the following to the Dockerfile:<br /><br />WORKDIR /build<br /><br />That way you don't have to "cd /build" before running <i>cargo</i>. This also makes it possible to run it directly like this:<br /><br />$ docker run --rm --net=host -v $(pwd):/build rust-linux-builder cargo build<br /> Compiling hello v0.1.0 (/build)<br /> Finished dev [unoptimized + debuginfo] target(s) in 2.52sAnonymousnoreply@blogger.com