Skip to content

Commit

Permalink
Insert a build stage in the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Oblath committed Jan 26, 2024
1 parent 54668e5 commit a60f38e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG img_repo=python
ARG img_tag=3.8-buster

FROM ${img_repo}:${img_tag}
FROM ${img_repo}:${img_tag} as base

ARG build_type=Release
ARG build_examples=FALSE
Expand Down Expand Up @@ -36,8 +36,11 @@ RUN cd /usr/local && \
mkdir build && \
cd build && \
cmake -DPYBIND11_TEST=FALSE .. && \
make -j3 install
make -j3 install && \
cd / && \
rm -rf /usr/local/pybind11

FROM base

# note that the build dir is *not* in source, this is so that the source can me mounted onto the container without covering the build target

Expand Down

0 comments on commit a60f38e

Please sign in to comment.