-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rust-web
30 lines (21 loc) · 1.08 KB
/
Dockerfile.rust-web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM trzeci/emscripten:sdk-tag-1.37.19-64bit
ENV RUST_VERSION=1.19.0
RUN DEBIAN_FRONTEND=noninteractive && apt-get update && \
apt-get install -yq --no-install-recommends \
build-essential ca-certificates curl \
git openssh-client libssl-dev pkg-config
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs
RUN curl -sO https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init && \
chmod +x rustup-init && \
./rustup-init -y --default-toolchain $RUST_VERSION --no-modify-path
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin
RUN rustup install nightly && \
. /root/.cargo/env && \
rustup target add asmjs-unknown-emscripten && \
rustup target add wasm32-unknown-emscripten
RUN git clone https://github.com/huytd/rust-webapp-template && \
cp -r rust-webapp-template rust-webapp && \
cd rust-webapp && make
WORKDIR /src
CMD ["/bin/bash"]