forked from NilFoundation/zkllvm-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.base
48 lines (39 loc) · 1.44 KB
/
Dockerfile.base
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
# build to ghcr.io/nilfoundation/build-base:$BOOST_VERSION
ARG BOOST_VERSION=1.76.0
ARG BOOST_VERSION_UNDERSCORED=1_76_0
ARG BOOST_SETUP_DIR=/opt/boost_${BOOST_VERSION_UNDERSCORED}
ARG BOOST_BUILD_DIRECTORY=/tmp/boost_${BOOST_VERSION_UNDERSCORED}
FROM ubuntu:22.04 as boost_builder
RUN DEBIAN_FRONTEND=noninteractive \
set -xe \
&& apt-get update \
&& apt-get -y --no-install-recommends --no-install-suggests install \
autoconf \
automake \
build-essential \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# using global args with their default versions
ARG BOOST_VERSION
ARG BOOST_VERSION_UNDERSCORED
ARG BOOST_SETUP_DIR
ARG BOOST_BUILD_DIRECTORY
WORKDIR /tmp
RUN set -xe \
&& wget -q --no-check-certificate \
https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORED}.tar.gz \
&& mkdir ${BOOST_BUILD_DIRECTORY} \
&& tar -xvf boost_${BOOST_VERSION_UNDERSCORED}.tar.gz \
&& rm boost_${BOOST_VERSION_UNDERSCORED}.tar.gz
WORKDIR ${BOOST_BUILD_DIRECTORY}
RUN set -xe \
&& sh ./bootstrap.sh --prefix=${BOOST_SETUP_DIR} \
&& ./b2 --prefix=${BOOST_SETUP_DIR} \
&& ./b2 install --prefix=${BOOST_SETUP_DIR}
FROM ubuntu:22.04
LABEL Name=build-base Version=1.76.0
# using global args with their default versions
ARG BOOST_SETUP_DIR
COPY --from=boost_builder ${BOOST_SETUP_DIR} ${BOOST_SETUP_DIR}
ENV BOOST_ROOT=${BOOST_SETUP_DIR}