Skip to content

Commit

Permalink
Replace ADD to COPY (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
leeopop authored Feb 19, 2024
1 parent 264ffc1 commit 77788ed
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ RUN useradd -ms /bin/bash $USER_NAME
# Rust user install
WORKDIR /home/$USER_NAME
RUN su -c "curl -f -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain none" - $USER_NAME
ADD ./rust-toolchain /
RUN chmod 444 /rust-toolchain
COPY --chown=$USER_NAME:$USER_NAME ./rust-toolchain /
RUN su -c "rustup toolchain install `cat /rust-toolchain | tr -d ' \n'` --profile minimal --component clippy rustfmt" - $USER_NAME
RUN rm /rust-toolchain
WORKDIR /

# User ci script
ADD . /home/$USER_NAME/
RUN chown -R $USER_NAME:$USER_NAME /home/$USER_NAME
COPY --chown=$USER_NAME:$USER_NAME . /home/$USER_NAME/
WORKDIR /home/$USER_NAME
RUN su -c "./ci.sh" - $USER_NAME
WORKDIR /

0 comments on commit 77788ed

Please sign in to comment.