Standardize PATH during build

- Introduced a standard PATH environment variable definition during the
  image build phase to ensure consistency across different build environments.
- Removed redundant PATH argument definition to streamline Dockerfile
  and related configurations.
- Adjusted volume bindings in docker-compose.yml and Dockerfile to support
  a new directory structure for binaries.
- Enabled PATH environment variable pass-through in docker-compose.yml to
  ensure custom binary paths are accessible.
- Minor adjustments to script generation and directory initialization to enhance container setup processes.

This update optimizes the build environment and improves container
configuration by ensuring that essential tools and custom binaries are
readily available in the PATH across all stages of the build and
execution process.
This commit is contained in:
2024-04-11 18:32:39 +02:00
parent e33f5ae552
commit cc4c950b92
3 changed files with 16 additions and 14 deletions

View File

@@ -9,14 +9,15 @@ TB_BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S')
USER=$(whoami)
USER_ID=$(id -u)
USER_GROUP_ID=$(id -g)
USER_DIR=${HOME}
USER_DIR="${HOME}"
HOST_PREFIX=tuxbox
BUILDENV_PREFIX="buildenv"
LOCAL_HOSTNAME=$(hostname)
ENABLE_UI_TOOLS="false"
USER_VOLUME_WORKDIR=${USER_DIR}/${HOST_PREFIX}
USER_VOLUME_BINDIR="${USER_DIR}/bin"
USER_VOLUME_WORKDIR="${USER_DIR}/${HOST_PREFIX}"
USER_VOLUME_WORKBINDIR="${USER_VOLUME_WORKDIR}/bin"
USER_VOLUME_DATADIR="${USER_VOLUME_WORKDIR}/.data"
TB_PATH="${USER_VOLUME_WORKDIR}/bin:${USER_DIR}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HISTFILE_NAME=".bash_history"
HISTFILE="${USER_VOLUME_DATADIR}/${HISTFILE_NAME}"
@@ -80,7 +81,6 @@ LC_ALL=${LANG}
LOCALE_LANG=${LANG}
LOCAL_HOSTNAME=${LOCAL_HOSTNAME}
NVIDIA_VISIBLE_DEVICES=all
PATH=${TB_PATH}
QT_QUICK_BACKEND=software
QT_XCB_GL_INTEGRATION=xcb_egl
START_PATH=${USER_VOLUME_WORKDIR}/${BUILDENV_PREFIX}
@@ -94,6 +94,8 @@ USER_ID=${USER_ID}
USER_PASSWORD=${USER}
USER_VOLUME_WORKDIR=${USER_VOLUME_WORKDIR}
USER_VOLUME_DATADIR=${USER_VOLUME_DATADIR}
USER_VOLUME_BINDIR=${USER_VOLUME_BINDIR}
USER_VOLUME_WORKBINDIR=${USER_VOLUME_WORKBINDIR}
TB_VERSION=${TB_VERSION}
XDG_CONFIG_HOME=/home
XDG_RUNTIME_DIR=/tmp/runtime-root