diff --git a/.dockerignore b/.dockerignore index c7e4a17..be8ce88 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,9 +4,17 @@ # (worse) can leak in-progress secrets or unfinished work into intermediate # image layers. -# Build outputs +# Build outputs. +# +# We DO need the staged jar to enter the build context — the Dockerfile +# either COPYs `target/netcopy.jar` (local `docker build .`) or +# `release/netcopy-.jar` (CI release.yml). The unignore patterns +# below let exactly those jars through while still keeping intermediate +# build artefacts (classes, generated sources, surefire reports, …) out. target/ +!target/netcopy.jar release/ +!release/*.jar # Git history (we COPY only the staged jar / entrypoint into the image) .git/