forked from msizanoen/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (22 loc) · 863 Bytes
/
Dockerfile
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
FROM circleci/rust:1.33.0-stretch as wasmer-build-env
RUN sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
cmake \
&& sudo rm -rf /var/lib/apt/lists/*
RUN curl -SL https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \
| tar -xJC /home/circleci
ENV LLVM_SYS_80_PREFIX /home/circleci/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/
FROM wasmer-build-env AS wasmer-debug-env
RUN sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
valgrind \
&& sudo rm -rf /var/lib/apt/lists/*
FROM wasmer-build-env AS wasmer-build
WORKDIR /home/circleci/wasmer
COPY . /home/circleci/wasmer
RUN sudo chmod -R 777 .
RUN cargo build --release
FROM debian:stretch AS wasmer
WORKDIR /root/
COPY --from=wasmer-build /home/circleci/wasmer/target/release/wasmer .
ENTRYPOINT ["./wasmer"]