-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 900 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 900 Bytes
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
31
32
33
34
35
36
# Use official rust image as base
FROM rust:slim
# Install necessary packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config \
make \
curl \
&& rm -rf /var/lib/apt/lists
# Install Trunk.rs
RUN cargo install trunk
# Add target for wasm
RUN rustup target add wasm32-unknown-unknown
# Install WABT
RUN curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-ubuntu-20.04.tar.gz | tar xz && \
mv wabt-1.0.36/bin/* /usr/local/bin/ && \
rm -rf wabt-1.0.36
# Install Binaryen
RUN curl -L https://github.com/WebAssembly/binaryen/releases/download/version_119/binaryen-version_119-x86_64-linux.tar.gz | tar xz && \
mv binaryen-version_119/bin/* /usr/local/bin/ && \
rm -rf binaryen-version_119
WORKDIR /usr/src/app
# Copy local project to container
COPY . .
# Build project into wasm
CMD ["make", "build"]