mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-07-26 04:48:08 +02:00
common: install rustup into /opt/rustup
To avoid long-running chown's per https://github.com/dockcross/dockcross/issues/901
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user