diff --git a/.dockerignore b/.dockerignore index 0d3c983..e02a379 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ -# Build outputs / generated files +# Build outputs / generated files. core/c-src/bindings.c is NOT excluded: it is +# the committed projection this image compiles, not something the image produces. node_modules/ wasm/ -core/c-src/bindings.c dist/ coverage/ diff --git a/Dockerfile b/Dockerfile index 72616c4..b584255 100644 --- a/Dockerfile +++ b/Dockerfile @@ -167,13 +167,13 @@ COPY --from=mobilitydb_src /root/MobilityDB /root/MobilityDB WORKDIR /app -# Install node deps first (cached unless package.json or lock change) -COPY package.json package-lock.json ./ -RUN npm ci --ignore-scripts - -# Now copy the rest and generate bindings +# The wrappers are taken from the tree rather than regenerated here. They are a +# projection of the MEOS-API catalog, and the catalog is derived from MobilityDB +# rather than committed, so an image that regenerates needs a catalog the tree +# does not carry. Compiling the committed wrappers also makes this build answer +# the question that matters to a consumer of the published package, who compiles +# exactly these: that they still build against the MEOS they are linked to. COPY . . -RUN npm run generate # CMAKE: configure MobilityDB RUN INCLUDES="-I/root/geos/include -I/root/geos/build/capi -I/root/json-c-install/include -I/root/json-c-install/include/json-c" \