You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/08/26 02:10:30 UTC
(superset) branch master updated: build(docker): update base debian image to 13 (trixie) (#34821)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new b8c2f7db47 build(docker): update base debian image to 13 (trixie) (#34821)
b8c2f7db47 is described below
commit b8c2f7db474ff3db0681f3b66fac515451f42d59
Author: Aleksey Karpov <86...@users.noreply.github.com>
AuthorDate: Tue Aug 26 05:10:23 2025 +0300
build(docker): update base debian image to 13 (trixie) (#34821)
---
.devcontainer/Dockerfile | 2 +-
.github/workflows/superset-frontend.yml | 2 +-
Dockerfile | 30 ++++++++++++++----------------
RELEASING/Dockerfile.from_local_tarball | 2 +-
RELEASING/Dockerfile.from_svn_tarball | 2 +-
RELEASING/Dockerfile.make_docs | 2 +-
RELEASING/Dockerfile.make_tarball | 2 +-
docker-compose-light.yml | 2 +-
docker-compose-non-dev.yml | 2 +-
docker-compose.yml | 2 +-
docker/apt-install.sh | 4 ++--
docker/pip-install.sh | 6 +++---
12 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index eacef7e716..ddd39d2195 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,5 +1,5 @@
# Keep this in sync with the base image in the main Dockerfile (ARG PY_VER)
-FROM python:3.11.13-bookworm AS base
+FROM python:3.11.13-trixie AS base
# Install system dependencies that Superset needs
# This layer will be cached across Codespace sessions
diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml
index 3665c6f059..943820bc80 100644
--- a/.github/workflows/superset-frontend.yml
+++ b/.github/workflows/superset-frontend.yml
@@ -47,7 +47,7 @@ jobs:
git show -s --format=raw HEAD
docker buildx build \
-t $TAG \
- --cache-from=type=registry,ref=apache/superset-cache:3.10-slim-bookworm \
+ --cache-from=type=registry,ref=apache/superset-cache:3.10-slim-trixie \
--target superset-node-ci \
.
diff --git a/Dockerfile b/Dockerfile
index 2fde626695..d515d25512 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,7 +18,7 @@
######################################################################
# Node stage to deal with static asset construction
######################################################################
-ARG PY_VER=3.11.13-slim-bookworm
+ARG PY_VER=3.11.13-slim-trixie
# If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise).
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
@@ -29,7 +29,7 @@ ARG BUILD_TRANSLATIONS="false"
######################################################################
# superset-node-ci used as a base for building frontend assets and CI
######################################################################
-FROM --platform=${BUILDPLATFORM} node:20-bookworm-slim AS superset-node-ci
+FROM --platform=${BUILDPLATFORM} node:20-trixie-slim AS superset-node-ci
ARG BUILD_TRANSLATIONS
ENV BUILD_TRANSLATIONS=${BUILD_TRANSLATIONS}
ARG DEV_MODE="false" # Skip frontend build in dev mode
@@ -64,7 +64,7 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j
--mount=type=bind,source=./superset-frontend/package-lock.json,target=./package-lock.json \
--mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
- if [ "$DEV_MODE" = "false" ]; then \
+ if [ "${DEV_MODE}" = "false" ]; then \
npm ci; \
else \
echo "Skipping 'npm ci' in dev mode"; \
@@ -80,7 +80,7 @@ FROM superset-node-ci AS superset-node
# Build the frontend if not in dev mode
RUN --mount=type=cache,target=/root/.npm \
- if [ "$DEV_MODE" = "false" ]; then \
+ if [ "${DEV_MODE}" = "false" ]; then \
echo "Running 'npm run ${BUILD_CMD}'"; \
npm run ${BUILD_CMD}; \
else \
@@ -91,11 +91,10 @@ RUN --mount=type=cache,target=/root/.npm \
COPY superset/translations /app/superset/translations
# Build translations if enabled, then cleanup localization files
-RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \
+RUN if [ "${BUILD_TRANSLATIONS}" = "true" ]; then \
npm run build-translation; \
fi; \
- rm -rf /app/superset/translations/*/*/*.po; \
- rm -rf /app/superset/translations/*/*/*.mo;
+ rm -rf /app/superset/translations/*/*/*.[po,mo];
######################################################################
@@ -106,10 +105,10 @@ FROM python:${PY_VER} AS python-base
ARG SUPERSET_HOME="/app/superset_home"
ENV SUPERSET_HOME=${SUPERSET_HOME}
-RUN mkdir -p $SUPERSET_HOME
+RUN mkdir -p ${SUPERSET_HOME}
RUN useradd --user-group -d ${SUPERSET_HOME} -m --no-log-init --shell /bin/bash superset \
- && chmod -R 1777 $SUPERSET_HOME \
- && chown -R superset:superset $SUPERSET_HOME
+ && chmod -R 1777 ${SUPERSET_HOME} \
+ && chown -R superset:superset ${SUPERSET_HOME}
# Some bash scripts needed throughout the layers
COPY --chmod=755 docker/*.sh /app/docker/
@@ -134,11 +133,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \
. /app/.venv/bin/activate && /app/docker/pip-install.sh --requires-build-essential -r requirements/translations.txt
COPY superset/translations/ /app/translations_mo/
-RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \
+RUN if [ "${BUILD_TRANSLATIONS}" = "true" ]; then \
pybabel compile -d /app/translations_mo | true; \
fi; \
- rm -f /app/translations_mo/*/*/*.po; \
- rm -f /app/translations_mo/*/*/*.json;
+ rm -f /app/translations_mo/*/*/*.[po,json]
######################################################################
# Python APP common layer
@@ -173,11 +171,11 @@ RUN mkdir -p \
ARG INCLUDE_CHROMIUM="false"
ARG INCLUDE_FIREFOX="false"
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
- if [ "$INCLUDE_CHROMIUM" = "true" ] || [ "$INCLUDE_FIREFOX" = "true" ]; then \
+ if [ "${INCLUDE_CHROMIUM}" = "true" ] || [ "${INCLUDE_FIREFOX}" = "true" ]; then \
uv pip install playwright && \
playwright install-deps && \
- if [ "$INCLUDE_CHROMIUM" = "true" ]; then playwright install chromium; fi && \
- if [ "$INCLUDE_FIREFOX" = "true" ]; then playwright install firefox; fi; \
+ if [ "${INCLUDE_CHROMIUM}" = "true" ]; then playwright install chromium; fi && \
+ if [ "${INCLUDE_FIREFOX}" = "true" ]; then playwright install firefox; fi; \
else \
echo "Skipping browser installation"; \
fi
diff --git a/RELEASING/Dockerfile.from_local_tarball b/RELEASING/Dockerfile.from_local_tarball
index 3794ed4c80..c56d75e87d 100644
--- a/RELEASING/Dockerfile.from_local_tarball
+++ b/RELEASING/Dockerfile.from_local_tarball
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM python:3.10-slim-bookworm
+FROM python:3.10-slim-trixie
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
diff --git a/RELEASING/Dockerfile.from_svn_tarball b/RELEASING/Dockerfile.from_svn_tarball
index 33d0e9451b..889724863a 100644
--- a/RELEASING/Dockerfile.from_svn_tarball
+++ b/RELEASING/Dockerfile.from_svn_tarball
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM python:3.10-slim-bookworm
+FROM python:3.10-slim-trixie
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
diff --git a/RELEASING/Dockerfile.make_docs b/RELEASING/Dockerfile.make_docs
index c4bca3bb3a..e62faa89f8 100644
--- a/RELEASING/Dockerfile.make_docs
+++ b/RELEASING/Dockerfile.make_docs
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM python:3.10-slim-bookworm
+FROM python:3.10-slim-trixie
ARG VERSION
RUN git clone --depth 1 --branch ${VERSION} https://github.com/apache/superset.git /superset
diff --git a/RELEASING/Dockerfile.make_tarball b/RELEASING/Dockerfile.make_tarball
index 4e701afd17..e3163273a5 100644
--- a/RELEASING/Dockerfile.make_tarball
+++ b/RELEASING/Dockerfile.make_tarball
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM python:3.10-slim-bookworm
+FROM python:3.10-slim-trixie
RUN apt-get update -y
RUN apt-get install -y \
diff --git a/docker-compose-light.yml b/docker-compose-light.yml
index 0535288024..c75dc671be 100644
--- a/docker-compose-light.yml
+++ b/docker-compose-light.yml
@@ -71,7 +71,7 @@ x-common-build: &common-build
context: .
target: ${SUPERSET_BUILD_TARGET:-dev} # can use `dev` (default) or `lean`
cache_from:
- - apache/superset-cache:3.10-slim-bookworm
+ - apache/superset-cache:3.10-slim-trixie
args:
DEV_MODE: "true"
INCLUDE_CHROMIUM: ${INCLUDE_CHROMIUM:-false}
diff --git a/docker-compose-non-dev.yml b/docker-compose-non-dev.yml
index 78eb3c010d..5d221ab602 100644
--- a/docker-compose-non-dev.yml
+++ b/docker-compose-non-dev.yml
@@ -33,7 +33,7 @@ x-common-build: &common-build
context: .
target: dev
cache_from:
- - apache/superset-cache:3.10-slim-bookworm
+ - apache/superset-cache:3.10-slim-trixie
services:
redis:
diff --git a/docker-compose.yml b/docker-compose.yml
index c9aaeb0088..252e8ffe0b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -36,7 +36,7 @@ x-common-build: &common-build
context: .
target: ${SUPERSET_BUILD_TARGET:-dev} # can use `dev` (default) or `lean`
cache_from:
- - apache/superset-cache:3.10-slim-bookworm
+ - apache/superset-cache:3.10-slim-trixie
args:
DEV_MODE: "true"
INCLUDE_CHROMIUM: ${INCLUDE_CHROMIUM:-false}
diff --git a/docker/apt-install.sh b/docker/apt-install.sh
index bd9152bebb..1c36353199 100755
--- a/docker/apt-install.sh
+++ b/docker/apt-install.sh
@@ -18,7 +18,7 @@
set -euo pipefail
# Ensure this script is run as root
-if [[ $EUID -ne 0 ]]; then
+if [[ ${EUID} -ne 0 ]]; then
echo "This script must be run as root" >&2
exit 1
fi
@@ -42,7 +42,7 @@ echo -e "${GREEN}Installing packages: $@${RESET}"
apt-get install -yqq --no-install-recommends "$@"
echo -e "${GREEN}Autoremoving unnecessary packages...${RESET}"
-apt-get autoremove -y
+apt-get autoremove -yqq --purge
echo -e "${GREEN}Cleaning up package cache and metadata...${RESET}"
apt-get clean
diff --git a/docker/pip-install.sh b/docker/pip-install.sh
index 7deb4fa19a..74fd6c4133 100755
--- a/docker/pip-install.sh
+++ b/docker/pip-install.sh
@@ -38,14 +38,14 @@ for arg in "$@"; do
done
# Install build-essential if required
-if $REQUIRES_BUILD_ESSENTIAL; then
+if ${REQUIRES_BUILD_ESSENTIAL}; then
echo "Installing build-essential for package builds..."
apt-get update -qq \
&& apt-get install -yqq --no-install-recommends build-essential
fi
# Choose whether to use pip cache
-if $USE_CACHE; then
+if ${USE_CACHE}; then
echo "Using pip cache..."
uv pip install "${ARGS[@]}"
else
@@ -54,7 +54,7 @@ else
fi
# Remove build-essential if it was installed
-if $REQUIRES_BUILD_ESSENTIAL; then
+if ${REQUIRES_BUILD_ESSENTIAL}; then
echo "Removing build-essential to keep the image lean..."
apt-get autoremove -yqq --purge build-essential \
&& apt-get clean \