Skip to content

Commit

Permalink
fix: clean after building for smaller layers
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Aug 20, 2024
1 parent a1cbb64 commit 110cc5a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ RUN set -eux; \
--enable-lto \
--enable-plugin; \
make -O -j$(nproc); \
make install
make install; \
make clean

FROM buildpack-deps:bookworm AS gcc
RUN set -eux; \
Expand Down Expand Up @@ -88,7 +89,8 @@ RUN set -eux; \
--enable-lto \
--disable-symvers; \
make -O -j$(nproc) all-gcc; \
make install-gcc
make install-gcc; \
make clean
ENV PATH=$PREFIX/bin:$PATH

COPY --link --from=kernel /kernel/libhermit.a /gcc/builddir-bootstrap/libhermit.a
Expand All @@ -106,7 +108,8 @@ RUN set -eux; \
--enable-newlib-io-c99-formats \
--enable-newlib-multithread; \
make -O -j$(nproc); \
make install
make install; \
make clean

ADD --link https://github.com/hermit-os/pthread-embedded.git /pthread-embedded
WORKDIR /pthread-embedded
Expand All @@ -115,7 +118,8 @@ RUN set -eux; \
--target=$TARGET \
--prefix=$PREFIX; \
make -O -j$(nproc); \
make install
make install; \
make clean

WORKDIR /gcc/builddir
RUN set -eux; \
Expand All @@ -136,7 +140,8 @@ RUN set -eux; \
--enable-lto \
--disable-symver; \
make -O -j$(nproc); \
make install
make install; \
make clean

FROM rust:bookworm AS toolchain
ARG PREFIX
Expand Down

0 comments on commit 110cc5a

Please sign in to comment.