-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.glibc
45 lines (34 loc) · 1.25 KB
/
Dockerfile.glibc
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
FROM rust:1.68.2 AS builder
LABEL org.opencontainers.image.description="SensorFu's Rust build container for amd64 glibc"
LABEL org.opencontainers.image.source=https://github.com/sensorfu/rust-env
ARG LIBRESSL=libressl-3.6.2
WORKDIR /work
COPY sigs/* ./
RUN gpg --no-tty --import libressl.asc
RUN curl -fO https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/${LIBRESSL}.tar.gz && \
gpg --no-tty --verify ${LIBRESSL}.tar.gz.asc ${LIBRESSL}.tar.gz && \
tar zxf ${LIBRESSL}.tar.gz && \
cd ${LIBRESSL} && \
./configure --prefix=/opt/libressl --enable-shared=no --sysconfdir=/etc && \
cp openssl.cnf cert.pem /etc/ssl && \
make V=1 -j4 && make -j4 check || ( cat tests/test-suite.log ; exit 1 ) && \
make install
RUN cargo install cargo-bom
FROM rust:1.68.2-slim
COPY --from=builder /opt /opt
COPY --from=builder /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem
COPY --from=builder /usr/local/cargo/bin/cargo-bom /usr/local/bin
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \
apt-get -y install \
bison \
file \
flex \
make \
protobuf-compiler \
&& \
rm -rf /var/lib/apt/lists/*
ENV OPENSSL_DIR=/opt/libressl
ENV OPENSSL_STATIC=1
WORKDIR /