liuchong/docker-rustup

Can't update toolchains

antifuchs opened this issue · 2 comments

I tried to build a docker image based on your rustup images (thank you so much for these, by the way), and wanted to update the nightly toolchain to the one that's currently out, using this naive method:

rustup update nightly

Sadly, this runs into the following problem in docker:

unable to update due to layerfs
Step 3/4 : RUN rustup update nightly

 ---> Running in 8b72657bbc0c

�[91minfo: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
�[0m
�[91minfo: latest update on 2017-09-16, rust version 1.22.0-nightly (fd4bef54a 2017-09-15)
�[0m
�[91minfo: downloading component 'rustc'
�[0m
�[91minfo: downloading component 'rust-std'
�[0m
�[91minfo: downloading component 'cargo'
�[0m
�[91minfo: downloading component 'rust-docs'
�[0m
�[91minfo: removing component 'rustc'
�[0m
�[91minfo: removing component 'rust-std'
�[0m
�[91minfo: removing component 'cargo'
�[0m
�[91minfo: removing component 'rust-docs'
�[0m
�[91minfo: rolling back changes
�[0m
�[91merror: could not rename component directory from '/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/share/doc/rust/html' to '/root/.rustup/tmp/omziwl1d4tvp_f9p_dir/bk'
info: caused by: Invalid cross-device link (os error 18)
�[0m
Removing intermediate container 8b72657bbc0c

The command '/bin/sh -c rustup update nightly' returned a non-zero code: 1

(You can also see the build output on docker hub here: https://hub.docker.com/r/antifuchs/rustup-ci/builds/bh6g3fkmuykk32sav82vqlu/)

I wonder if there's something that these docker images could work around, so I'm reporting this here; it might just be unsolvable & I might have to remove the nightly toolchain and tmp dir before attempting the update.

Anyway, if you know of a solution that might work, I'd love to hear about it!

Maybe this is a temporary issue? I've made a test with your Dockerfile, it successed:
https://hub.docker.com/r/liuchong/test/builds/b2gjjifiyaensthvnais7db/

Also I've added a onbuild version for nightly which maybe you can try: liuchong/rustup:nightly-onbuild, it will install nightly toolchains when build new image so the update will be avoided.

Oohh, the nightly-onbuild version works like a charm! Thanks so much - I'll set up my CI docker images to use that! (: