Improve base image validation and update Dockerfile comments for clarity

This commit is contained in:
Tatsuya Ishikawa 2026-01-03 14:56:24 +09:00
parent 6bfca7eab0
commit a56f31c8d2
3 changed files with 8 additions and 4 deletions

View File

@ -123,7 +123,8 @@ echo "Target arch: ${TARGET_ARCH}, platform: ${PLATFORM}"
echo "Language: ${USER_LANGUAGE}"
echo "Version tag: ${VERSION}"
if ! docker image inspect "${BASE_IMAGE}" >/dev/null 2>&1; then
# Check if base image exists using docker images (more reliable than inspect)
if ! docker images --format '{{.Repository}}:{{.Tag}}' | grep -q "^${BASE_IMAGE}$"; then
echo "Base image ${BASE_IMAGE} not found locally. Build it first (e.g. ./build-base-image.sh -a ${TARGET_ARCH} -v ${VERSION})." >&2
exit 1
fi

View File

@ -77,5 +77,5 @@ if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null && [ "${DISAB
export GALLIUM_DRIVER=zink
fi
# Start DE
exec dbus-launch --exit-with-session /usr/bin/startplasma-x11 > /dev/null 2>&1
# Start DE (without exec to allow dbus-launch to work properly)
dbus-launch --exit-with-session /usr/bin/startplasma-x11 > /dev/null 2>&1

View File

@ -1,9 +1,12 @@
ARG BASE_IMAGE
# Base image must be provided via --build-arg BASE_IMAGE=<image>
ARG BASE_IMAGE=scratch
FROM ${BASE_IMAGE}
ARG USER_NAME
ARG USER_UID
ARG USER_GID
# Note: USER_PASSWORD is used only during image build for initial setup.
# It is not stored in the image layers. Change password after first login.
ARG USER_PASSWORD=""
ARG HOST_HOSTNAME="Docker-Host"
ARG USER_LANGUAGE="en"