fix: better multi-stage build
This commit is contained in:
parent
f3e9c1502c
commit
363e1c8215
|
@ -0,0 +1,3 @@
|
|||
[submodule "boost"]
|
||||
path = boost
|
||||
url = https://github.com/boostorg/boost
|
17
Dockerfile
17
Dockerfile
|
@ -1,16 +1,19 @@
|
|||
FROM debian:12.5
|
||||
FROM debian:12.5 as builder
|
||||
MAINTAINER arielherself
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt update
|
||||
RUN apt install git build-essential software-properties-common autoconf automake libtool pkg-config ca-certificates libssl-dev locales locales-all libzstd-dev liblzma-dev libbz2-dev libz-dev -y
|
||||
RUN apt install --no-install-recommends build-essential ca-certificates libssl-dev libzstd-dev liblzma-dev libbz2-dev libz-dev -y
|
||||
RUN apt clean
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US.UTF-8
|
||||
RUN git clone "https://github.com/boostorg/boost" /boost_inst --recursive
|
||||
RUN mkdir /boost_inst
|
||||
RUN mkdir /boost_target
|
||||
ADD ./boost /boost_inst
|
||||
WORKDIR /boost_inst
|
||||
RUN ./bootstrap.sh
|
||||
RUN ./bootstrap.sh --prefix=/boost_target
|
||||
RUN ./b2 install -q
|
||||
WORKDIR /
|
||||
RUN rm -rf /boost_inst
|
||||
|
||||
FROM debian:12.5
|
||||
COPY --from=builder /boost_target/include/. /usr/local/include/
|
||||
COPY --from=builder /boost_target/lib/. /usr/local/lib/
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit cd2c160f11f1141ca18944dbbf46fdd8fe60e3af
|
Loading…
Reference in New Issue