diff --git a/Dockerfile b/Dockerfile index 2fba817..a31fd61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,10 @@ RUN sed -i 's/^CXX=clang++$/&-18/' Makefile RUN make nosandbox -j$(nproc) +# export-only stage: `docker build --target=export --output=./bin .` +FROM scratch AS export +COPY --from=build /usr/src/app/bin/fusion /fusion + # prod FROM alpine:3 diff --git a/build_docker.sh b/build_docker.sh new file mode 100755 index 0000000..772f75f --- /dev/null +++ b/build_docker.sh @@ -0,0 +1 @@ +docker build --target=export --output=./bin .