-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
50 lines (36 loc) · 1.13 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM rust:1.74.1-bookworm AS builder
ARG LLVM_VERSION=15.0.0
ARG LLVM_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.0/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4.tar.xz
WORKDIR /wasker
COPY . .
# install dependencies
RUN apt-get update && apt-get install -y \
git \
wget \
tar \
cmake \
libffi-dev \
build-essential \
xz-utils \
cmake
# install llvm
RUN mkdir -p /usr/local/llvm \
&& wget ${LLVM_URL} -O /tmp/llvm.tar.xz \
&& tar -xvf /tmp/llvm.tar.xz -C /usr/local/llvm \
&& rm /tmp/llvm.tar.xz
ENV PATH=/usr/local/llvm/bin:$PATH
ENV LLVM_SYS_150_PREFIX=/usr/local/llvm/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4
RUN cargo build --release
FROM debian:bookworm-slim
WORKDIR /work
COPY --from=builder /wasker/target/release/wasker /usr/bin/wasker
COPY --from=builder /usr/local/llvm /usr/local/llvm
# install dependencies
RUN apt-get update && apt-get install -y \
libffi-dev \
build-essential \
libc6 \
libstdc++6
ENV PATH=/usr/local/llvm/bin:$PATH
ENV LLVM_SYS_150_PREFIX=/usr/local/llvm/clang+llvm-15.0.0-x86_64-linux-gnu-rhel-8.4
ENTRYPOINT ["wasker"]