File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG UBUNTU_VERSION=22.04
2+ ARG CUSTOM_CERT
3+ ARG ENABLE_LEGACY_RENEGOTIATION
4+
5+ FROM ubuntu:$UBUNTU_VERSION
6+
7+ ARG CUSTOM_CERT
8+ ARG ENABLE_LEGACY_RENEGOTIATION
9+
10+ ENV DEBIAN_FRONTEND=noninteractive
11+
12+ # Install the base dependencies
13+ RUN apt-get update && apt-get install -y --no-install-recommends \
14+ python3 \
15+ python3-dev \
16+ python-is-python3 \
17+ wget \
18+ curl \
19+ ca-certificates \
20+ gcc \
21+ g++ \
22+ gfortran \
23+ cmake \
24+ ninja-build \
25+ git \
26+ libssl-dev
27+
28+ # Setup a custom certificate/SSL settings depending upon build arguments
29+ # Include README.md here so that the build doesn't fail if there is no custom
30+ # certificate specified. Then we just delete it afterwards.
31+ COPY README.md $CUSTOM_CERT /usr/local/share/ca-certificates/
32+ RUN rm /usr/local/share/ca-certificates/README.md \
33+ && update-ca-certificates
34+ RUN if [ -n "$ENABLE_LEGACY_RENEGOTIATION" ]; then echo "Options = UnsafeLegacyRenegotiation" >> /etc/ssl/openssl.cnf ; fi
35+
36+ # Can this be converted into a native Ubuntu install as in the LLVM case
37+ ENV CARGO_HOME="/cargo"
38+ ENV RUSTUP_HOME="/rustup"
39+ RUN curl https://sh.rustup.rs | sh -s -- -y --default-toolchain none
40+ ENV PATH="$PATH:/cargo/bin"
41+
42+ # Set up the Python dependencies
43+ COPY Pipfile* ./
44+ RUN pip3 install pipenv \
45+ && pipenv sync --categories "packages dev-packages" --system \
46+ && pipenv --clear \
47+ && rm Pipfile*
48+
49+ # Clean up the Docker container to make the image smaller
50+ RUN apt-get autoremove -y --purge \
51+ && apt-get clean -y \
52+ && rm -rf /var/lib/apt/lists/*
53+
54+ ENV DEBIAN_FRONTEND=
You can’t perform that action at this time.
0 commit comments