diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e295030e..d4cfc6400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ All notable changes to this project will be documented in this file. - omid: bump version to 1.1.3 ([#1105]) - hbase: add 2.6.2 and upgrade dependencies ([#1101]) - kafka: Add `4.0.0` ([#1117]) +- Include `.tar.gz` snapshots of the product source code in container images ([#1126]) ### Changed @@ -145,6 +146,7 @@ All notable changes to this project will be documented in this file. [#1122]: https://github.com/stackabletech/docker-images/pull/1122 [#1124]: https://github.com/stackabletech/docker-images/pull/1124 [#1125]: https://github.com/stackabletech/docker-images/pull/1125 +[#1126]: https://github.com/stackabletech/docker-images/pull/1126 [#1128]: https://github.com/stackabletech/docker-images/pull/1128 ## [25.3.0] - 2025-03-21 diff --git a/druid/Dockerfile b/druid/Dockerfile index e4be588f1..6605210ed 100644 --- a/druid/Dockerfile +++ b/druid/Dockerfile @@ -54,6 +54,9 @@ RUN --mount=type=cache,id=maven-${PRODUCT},uid=${STACKABLE_USER_UID},target=/sta cd "$(cat /tmp/DRUID_SOURCE_DIR)" || exit 1 rm /tmp/DRUID_SOURCE_DIR +# Create snapshot of the source code including custom patches +tar -czf /stackable/druid-${PRODUCT}-src.tar.gz . + mvn \ --batch-mode \ --no-transfer-progress \ @@ -120,6 +123,7 @@ LABEL io.k8s.display-name="${NAME}" COPY --chown=${STACKABLE_USER_UID}:0 --from=druid-builder /stackable/apache-druid-${PRODUCT} /stackable/apache-druid-${PRODUCT} +COPY --chown=${STACKABLE_USER_UID}:0 --from=druid-builder /stackable/druid-${PRODUCT}-src.tar.gz /stackable COPY --chown=${STACKABLE_USER_UID}:0 druid/stackable/bin /stackable/bin COPY --chown=${STACKABLE_USER_UID}:0 druid/licenses /licenses diff --git a/hadoop/Dockerfile b/hadoop/Dockerfile index b3c6eb99a..c8d0f6877 100644 --- a/hadoop/Dockerfile +++ b/hadoop/Dockerfile @@ -11,32 +11,40 @@ ARG TARGETARCH ARG TARGETOS ARG STACKABLE_USER_UID +WORKDIR /stackable + +COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/patchable.toml /stackable/src/shared/protobuf/stackable/patches/patchable.toml +COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/${PROTOBUF} /stackable/src/shared/protobuf/stackable/patches/${PROTOBUF} + +RUN <= 1.23.1) go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.7.0 -curl "https://repo.stackable.tech/repository/packages/opa/opa_${PRODUCT}.tar.gz" -o opa.tar.gz -tar -zxvf opa.tar.gz -mv "opa-${PRODUCT}" opa -EOF -WORKDIR /opa +cd "$(/stackable/patchable --images-repo-root=src checkout opa ${PRODUCT})" + +# Create snapshot of the source code including custom patches +tar -czf /stackable/opa-${PRODUCT}-src.tar.gz . -RUN <