diff --git a/common/common.docker b/common/common.docker index 2163cb0..0be968a 100644 --- a/common/common.docker +++ b/common/common.docker @@ -18,6 +18,9 @@ ARG CURL_HASH=3b4378156ba09e224008e81dcce854b7ce4d182b1f9cfb97fe5ed9e9c18c6bd3 ARG PERL_VERSION=perl-5.40.1 ARG PERL_HASH=02f8c45bb379ed0c3de7514fad48c714fd46be8f0b536bfd5320050165a1ee26 +ENV RUSTUP_HOME=/opt/rustup +ENV CARGO_HOME=/opt/rustup/cargo + # Image build scripts COPY \ imagefiles/build-and-install-cmake.sh \ @@ -49,6 +52,8 @@ RUN \ /buildscripts/build-and-install-flatcc.sh && \ rm -rf /buildscripts +ENV PATH=/opt/rustup/cargo/bin:$PATH + RUN echo "root:root" | chpasswd WORKDIR /work ENTRYPOINT ["/dockcross/entrypoint.sh"] diff --git a/imagefiles/entrypoint.sh b/imagefiles/entrypoint.sh index 28c2378..f93051f 100755 --- a/imagefiles/entrypoint.sh +++ b/imagefiles/entrypoint.sh @@ -32,13 +32,6 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then export HOME=/home/${BUILDER_USER} shopt -s dotglob - # Move rustup/cargo directories as they are large, and not needed as root - if [[ -d /root/.rustup ]]; then - mv -t $HOME/ /root/.rustup - fi - if [[ -d /root/.cargo ]]; then - mv -t $HOME/ /root/.cargo - fi # Copy the rest cp -r /root/* $HOME/ chown -R $BUILDER_UID:$BUILDER_GID $HOME