@@ -72,12 +72,8 @@ RUN apt-get update && \
72
72
# Static linking for C++ code
73
73
RUN sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++"
74
74
75
- # Allow sudo without a password.
76
- ADD sudoers /etc/sudoers.d/nopasswd
77
-
78
- # Run all further code as user `rust`, and create our working directories
79
- # as the appropriate user.
80
- USER rust
75
+ # Create a working directory
76
+ ENV HOME=/home/rust
81
77
RUN mkdir -p /home/rust/libs /home/rust/src
82
78
83
79
# Set up our path with all our binary directories, including those for the
@@ -91,8 +87,7 @@ ENV PATH=/home/rust/.cargo/bin:/usr/local/musl/bin:/usr/local/sbin:/usr/local/bi
91
87
# manually.
92
88
RUN curl https://sh.rustup.rs -sSf | \
93
89
sh -s -- -y --default-toolchain $TOOLCHAIN && \
94
- rustup target add x86_64-unknown-linux-musl && \
95
- rustup target add armv7-unknown-linux-musleabihf
90
+ rustup target add x86_64-unknown-linux-musl
96
91
ADD cargo-config.toml /home/rust/.cargo/config
97
92
98
93
# Set up a `git credentials` helper for using GH_USER and GH_TOKEN to access
@@ -168,6 +163,5 @@ RUN cargo install -f cargo-audit && \
168
163
cargo install -f mdbook-graphviz && \
169
164
rm -rf /home/rust/.cargo/registry/
170
165
171
- # Expect our source code to live in /home/rust/src. We'll run the build as
172
- # user `rust`, which will be uid 1000, gid 1000 outside the container.
166
+ # Expect our source code to live in /home/rust/src.
173
167
WORKDIR /home/rust/src
0 commit comments