forked from redsift/ingraind-build
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.22.04
85 lines (77 loc) · 2.36 KB
/
Dockerfile.22.04
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM ubuntu:22.04
ARG openssl_arch=linux-x86_64
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install \
curl \
wget \
lsb-release \
software-properties-common \
debhelper \
cmake \
llvm \
libllvm14 \
llvm-14-dev \
libclang-14-dev \
libelf-dev \
bison \
flex \
libedit-dev \
clang-format-14 \
python-is-python3 \
python3-netaddr \
luajit \
libluajit-5.1-dev \
arping \
iperf \
netperf \
ethtool \
devscripts \
zlib1g-dev \
libfl-dev \
pkg-config \
libssl-dev \
git \
clang \
musl \
musl-tools\
musl-dev \
capnproto \
linux-headers-generic \
&& apt-get clean -y
RUN ln -sf /usr/bin/llvm-config-14 /usr/bin/llvm-config
RUN llvm-config --version | grep -q '^14'
RUN apt-get -y install "linux-image-$(ls /lib/modules)"
RUN curl https://sh.rustup.rs -sSf > rustup.sh \
&& sh rustup.sh -y \
--default-toolchain stable \
--profile minimal \
--no-modify-path \
&& rustup component add rustfmt \
&& rustup target add x86_64-unknown-linux-musl \
&& rustup toolchain add nightly --profile minimal \
&& rustup --version \
&& cargo --version \
&& rustc --version \
&& cargo install bindgen-cli \
&& rm -f rustup.sh
RUN echo "Building OpenSSL" \
&& VERS=1.0.2p \
&& CHECKSUM=50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00 \
&& curl -sqO https://www.openssl.org/source/openssl-$VERS.tar.gz \
&& echo "$CHECKSUM openssl-$VERS.tar.gz" > checksums.txt \
&& sha256sum -c checksums.txt \
&& tar xzf openssl-$VERS.tar.gz && cd openssl-$VERS \
&& CC=musl-gcc ./Configure ${openssl_arch} -fPIC --prefix=/usr/local/musl/$TARGET \
&& make depend \
&& make && make install \
&& cd .. && rm -rf openssl-$VERS.tar.gz openssl-$VERS checksums.txt
ENV OPENSSL_DIR=/usr/local/musl/$TARGET/ \
OPENSSL_INCLUDE_DIR=/usr/local/musl/$TARGET/include/ \
DEP_OPENSSL_INCLUDE=/usr/local/musl/$TARGET/include/ \
OPENSSL_LIB_DIR=/usr/local/musl/$TARGET/lib/ \
OPENSSL_STATIC=1
WORKDIR /build