Skip to content

Commit da578ec

Browse files
committed
first attempt for building rust
1 parent d170f42 commit da578ec

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM centos:latest
2+
COPY install_rust.sh /root/
23
RUN echo "unsafe-perm = true" > /root/.npmrc
34
RUN echo "{ \"allow_root\": true }" > /root/.bowerrc
45
RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash -
@@ -16,9 +17,13 @@ VOLUME /src
1617
VOLUME /build
1718
WORKDIR /build
1819

20+
# Install chrome
1921
RUN curl -sL https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm > /root/chrome.rpm
2022
RUN yum localinstall -y /root/chrome.rpm
2123

24+
# Install rust
25+
RUN bash /root/install_rust.sh
26+
2227
# USER user
2328

2429
# RUN npm install

install_rust.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /root/rustup.sh
2+
sh /root/rustup.sh -y
3+
source /root/.cargo/env
4+
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
5+
rustup toolchain install nightly
6+
rustup override set nightly
7+
cat /root/.cargo/env >> /etc/bashrc

0 commit comments

Comments
 (0)