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
|
MAINTAINER arielherself
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt update
|
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
|
RUN apt clean
|
||||||
ENV LC_ALL en_US.UTF-8
|
RUN mkdir /boost_inst
|
||||||
ENV LANG en_US.UTF-8
|
RUN mkdir /boost_target
|
||||||
ENV LANGUAGE en_US.UTF-8
|
ADD ./boost /boost_inst
|
||||||
RUN git clone "https://github.com/boostorg/boost" /boost_inst --recursive
|
|
||||||
WORKDIR /boost_inst
|
WORKDIR /boost_inst
|
||||||
RUN ./bootstrap.sh
|
RUN ./bootstrap.sh --prefix=/boost_target
|
||||||
RUN ./b2 install -q
|
RUN ./b2 install -q
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN rm -rf /boost_inst
|
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