Skip to content

Commit 9ec32f9

Browse files
committed
Update Dockerfile to make Rust available for www user
1 parent bd2f010 commit 9ec32f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ RUN apt-get update && apt-get install -y \
2323
git \
2424
curl
2525

26-
27-
# Install Rust toolchain
28-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
29-
ENV PATH="/root/.cargo/bin:${PATH}"
30-
31-
# Install PHP FFI development files
26+
# Install PHP FFI development files required to interface with Rust for BattleEngine
3227
RUN apt-get update && apt-get install -y \
3328
pkg-config \
3429
libffi-dev
@@ -82,5 +77,10 @@ RUN chmod +x /usr/local/bin/entrypoint && \
8277
# Switch to www user
8378
USER www
8479

80+
# Setup Rust/Cargo for www user
81+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
82+
. "$HOME/.cargo/env" && \
83+
echo 'source $HOME/.cargo/env' >> ~/.bashrc
84+
8585
# Run entrypoint
8686
CMD ["/usr/local/bin/entrypoint"]

0 commit comments

Comments
 (0)