This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.20.04
57 lines (50 loc) · 2.03 KB
/
Dockerfile.20.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
FROM ubuntu:20.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 wget software-properties-common \
&& bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" \
&& apt-get update \
&& apt-get -y install debhelper cmake llvm libllvm11 llvm-11-dev libclang-11-dev \
libelf-dev bison flex libedit-dev clang-format-11 python python-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 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 rsign2
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