diff --git a/README.md b/README.md index 3d1b28f..5d9e049 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,7 @@ FROM ekidd/rust-musl-builder # We need to add the source code to the image because `rust-musl-builder` # assumes a UID of 1000, but TravisCI has switched to 2000. -ADD . ./ -RUN sudo chown -R rust:rust . +ADD --chown=rust:rust . ./ CMD cargo build --release ``` diff --git a/examples/linking-with-git2/Dockerfile b/examples/linking-with-git2/Dockerfile index 114a594..d0e89fb 100644 --- a/examples/linking-with-git2/Dockerfile +++ b/examples/linking-with-git2/Dockerfile @@ -7,10 +7,7 @@ FROM ekidd/rust-musl-builder AS builder # Add our source code. -ADD . ./ - -# Fix permissions on source code. -RUN sudo chown -R rust:rust /home/rust +ADD --chown=rust:rust . ./ # Build our application. RUN cargo build diff --git a/examples/using-diesel/Dockerfile b/examples/using-diesel/Dockerfile index 634a521..7aa1d1d 100644 --- a/examples/using-diesel/Dockerfile +++ b/examples/using-diesel/Dockerfile @@ -11,10 +11,7 @@ ARG BASE_IMAGE=ekidd/rust-musl-builder:latest FROM ${BASE_IMAGE} AS builder # Add our source code. -ADD . ./ - -# Fix permissions on source code. -RUN sudo chown -R rust:rust /home/rust +ADD --chown=rust:rust . ./ # Build our application. RUN cargo build --release