forked from redsift/ingraind-build
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.fedora36
70 lines (63 loc) · 2.13 KB
/
Dockerfile.fedora36
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
FROM fedora:36
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 echo "max_parallel_download=20" >> /etc/dnf/dnf.conf \
&& echo "fastestmirror=True" >> /etc/dnf/dnf.conf \
&& dnf install -y clang-14.0.0 \
llvm-14.0.0 \
llvm-libs-14.0.0 \
llvm-devel-14.0.0 \
llvm-static-14.0.0 \
kernel \
kernel-devel \
elfutils-libelf-devel \
ca-certificates \
musl-devel \
musl-clang \
musl-libc \
musl-libc-static \
musl-gcc \
openssl-devel \
perl-podlators \
perl-File-Compare \
capnproto \
dnf-utils \
git \
make \
makedepend \
zstd \
bzip2
RUN llvm-config --version | grep -q '^14'
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
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
COPY yum/repos.d/ /etc/yum.repos.d/
WORKDIR /build