Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file.
- airflow,superset: Build from source ([#1304]).
- kafka: Add updated JMX config `server.yaml` for KRaft ([#1308]).
- airflow: Add apache-kafka provider plus dependencies to `3.0.6` image ([#1313]).
- airflow,superset: Reduce image size and add a snapshot of the source code ([#1326]).

### Changed

Expand Down Expand Up @@ -122,6 +123,7 @@ All notable changes to this project will be documented in this file.
[#1320]: https://github.com/stackabletech/docker-images/pull/1320
[#1322]: https://github.com/stackabletech/docker-images/pull/1322
[#1323]: https://github.com/stackabletech/docker-images/pull/1323
[#1326]: https://github.com/stackabletech/docker-images/pull/1326

## [25.7.0] - 2025-07-23

Expand Down
10 changes: 9 additions & 1 deletion airflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ RUN microdnf module enable -y nodejs:${NODEJS_VERSION} && \
npm \
nodejs \
# Needed to modify the SBOM
jq && \
jq \
# Needed to create the source code snapshot
tar && \
microdnf clean all && \
rm -rf /var/cache/yum

Expand All @@ -103,6 +105,8 @@ uv tool install hatch

cd "$(/stackable/patchable --images-repo-root=src checkout airflow ${PRODUCT_VERSION})"

tar -czf /stackable/airflow-${PRODUCT_VERSION}-src.tar.gz .

if [ -d "./airflow-core" ]; then
# Airflow 3.x
cd airflow-core/src/airflow/ui
Expand Down Expand Up @@ -155,6 +159,10 @@ jq '.dependencies |= map(if .ref | test("^apache-airflow-providers-") then
else
.
end)' /tmp/sbom.json > /stackable/app/airflow-${PRODUCT_VERSION}.cdx.json

# Clean up build artifacts and temporary files to reduce image size
cd /stackable
rm -rf ./src
EOF

RUN <<EOF
Expand Down
9 changes: 9 additions & 0 deletions superset/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ RUN microdnf module enable -y nodejs:${NODEJS_VERSION} && \
# Needed to build Superset UI assets
npm \
nodejs \
# Needed to create the source code snapshot
tar \
&& microdnf clean all && \
rm -rf /var/cache/yum

Expand Down Expand Up @@ -97,6 +99,9 @@ pip install --no-cache-dir --upgrade pip setuptools==75.2.0 uv==${UV_VERSION}

cd "$(/stackable/patchable --images-repo-root=src checkout superset ${PRODUCT_VERSION})"

# Create snapshot of the source code including custom patches
tar -czf /stackable/superset-${PRODUCT_VERSION}-src.tar.gz .

# Build front-end assets
cd superset-frontend

Expand Down Expand Up @@ -153,6 +158,10 @@ uv pip install --no-cache-dir /tmp/opa_authorizer-0.1.0-py3-none-any.whl
cyclonedx-py environment --schema-version 1.5 --outfile /stackable/app/superset-${PRODUCT_VERSION}.cdx.json
uv pip uninstall cyclonedx-bom

# Clean up build artifacts and temporary files to reduce image size
cd /stackable
rm -rf ./src

chmod --recursive g=u /stackable
EOF

Expand Down