Skip to content

Instantly share code, notes, and snippets.

@bdangit
Last active November 2, 2016 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdangit/60a5842c1499254131094c577bf79027 to your computer and use it in GitHub Desktop.
Save bdangit/60a5842c1499254131094c577bf79027 to your computer and use it in GitHub Desktop.
What I did to get the nightly versions.
diff --git a/Dockerfile b/Dockerfile
index a7b2f7d..719dbc5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,6 +36,8 @@ ENV HAB_DEPOT_URL ${HAB_DEPOT_URL:-}
RUN curl -sSf https://sh.rustup.rs \
| env -u CARGO_HOME sh -s -- -y --no-modify-path --default-toolchain stable \
&& env -u CARGO_HOME rustup target add x86_64-unknown-linux-musl \
+ && env -u CARGO_HOME rustup install nightly \
+ && env -u CARGO_HOME rustup default nightly \
&& rustc -V \
&& cargo --version
RUN env -u CARGO_HOME cargo install protobuf && rm -rf /root/.cargo/registry

If you are using Virtualbox and you see this:

   Compiling router v0.4.0
   Compiling habitat_depot_client v0.0.0 (file:///src/components/builder-depot-client)
   Compiling habitat_common v0.0.0 (file:///src/components/common)
error: failed to link `/src/target/debug/deps/libhabitat_director.rlib` to `/src/target/debug/libhabitat_director.rlib`

You will want to get the nightly versions of Cargo. Virtualbox does not support hardlinks as discovered in this Cargo Issue #3098.

In the nightly's, a pull-request was made to fallback to resort to plain ole cp when hardlinks does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment