From 6311417b0852a7e385d6bacab36219a56e562f62 Mon Sep 17 00:00:00 2001 From: Salvydas Lukosius Date: Thu, 26 Oct 2023 13:31:44 +0100 Subject: [PATCH] modified: .trunk/.gitignore modified: .trunk/trunk.yaml modified: docker/Dockerfile modified: docker/build.sh modified: docker/run.sh --- .trunk/.gitignore | 1 + .trunk/trunk.yaml | 20 ++++++++++++-------- docker/Dockerfile | 22 ++++++++-------------- docker/build.sh | 4 ++-- docker/run.sh | 8 ++++---- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.trunk/.gitignore b/.trunk/.gitignore index cf2f254..1e24652 100644 --- a/.trunk/.gitignore +++ b/.trunk/.gitignore @@ -2,6 +2,7 @@ *logs *actions *notifications +*tools plugins user_trunk.yaml user.yaml diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index dee54d5..0d154b1 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,26 +1,30 @@ version: 0.1 cli: - version: 1.7.0 + version: 1.17.1 plugins: sources: - id: trunk - ref: v0.0.14 + ref: v1.2.6 uri: https://github.com/trunk-io/plugins lint: disabled: - yamllint enabled: - - actionlint@1.6.23 + - checkov@2.5.9 + - terrascan@1.18.3 + - trivy@0.46.0 + - trufflehog@3.60.4 + - actionlint@1.6.26 - git-diff-check - - gitleaks@8.16.2 + - gitleaks@8.18.0 - hadolint@2.12.0 - - markdownlint@0.33.0 - - prettier@2.8.7 + - markdownlint@0.37.0 + - prettier@3.0.3 - shellcheck@0.9.0 - - shfmt@3.5.0 + - shfmt@3.6.0 runtimes: enabled: - - go@1.19.5 + - go@1.21.0 - node@18.12.1 - python@3.10.8 actions: diff --git a/docker/Dockerfile b/docker/Dockerfile index 7cadc00..6fb79eb 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,22 +5,17 @@ LABEL email="<%= team@zshell.dev =%>" ARG HOSTNAME=zi@docker ARG ZUSER=z-user -ARG PUID=1000 -ARG PGID=1000 -ARG TERM=xterm-256color -ARG ZI_ZSH_VERSION -ARG APK_ADD ARG SHELL=/bin/zsh ARG DIR=/static -#ARG ZI_HOME_DIR=/home/${ZUSER}/.zi -#ARG ZI_BIN_DIR=/home/${ZUSER}/.zi/bin -ENV ZUSER=${ZUSER} PUID=${PUID} -ENV PGID=${PGID} APK_ADD=${APK_ADD} +ENV ZUSER=${ZUSER} +ENV PUID=${PUID} +ENV PGID=${PGID} +ENV HOSTNAME=${HOSTNAME} +ENV APK_ADD=${APK_ADD} ENV DIR=${DIR} TERM=${TERM} ENV ZI_ZSH_VERSION=${ZI_ZSH_VERSION} -ENV ZI_HOME_DIR=${ZI_HOME_DIR} -ENV ZI_BIN_DIR=${ZI_BIN_DIR} +ENV ZI_HOME_DIR=${ZI_HOME_DIR} ZI_BIN_DIR=${ZI_BIN_DIR} # trunk-ignore(hadolint/DL3018) RUN apk --no-cache --virtual base add coreutils curl \ @@ -37,7 +32,6 @@ COPY --chown=${ZUSER} . /src USER ${ZUSER} WORKDIR /home/${ZUSER} -RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh)" -- -i skip \ -&& /bin/zsh -cl -- '@zi-scheduler burst || true' +RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh)" -- -i skip -CMD ["/bin/zsh", "-il"] +CMD ["/bin/zsh", "-l"] diff --git a/docker/build.sh b/docker/build.sh index a5934f6..1d1c703 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -55,10 +55,10 @@ build() { } if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then - BUILD_ZSH_VERSION="${BUILD_ZSH_VERSION:-}" + BUILD_ZSH_VERSION="${BUILD_ZSH_VERSION-}" CONTAINER_IMAGE="${CONTAINER_IMAGE:-ghcr.io/z-shell/zd}" CONTAINER_TAG="${CONTAINER_TAG:-latest}" - NO_CACHE="${NO_CACHE:-}" + NO_CACHE="${NO_CACHE-}" while [[ -n $* ]]; do case "$1" in diff --git a/docker/run.sh b/docker/run.sh index dbe2095..7f28f72 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -117,10 +117,10 @@ if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then CONTAINER_TAG="${CONTAINER_TAG:-latest}" CONTAINER_ENV=() CONTAINER_VOLUMES=() - DEBUG="${DEBUG:-}" - ZSH_DEBUG="${ZSH_DEBUG:-}" - INIT_CONFIG_VAL="${INIT_CONFIG_VAL:-}" - WRAP_CMD="${WRAP_CMD:-}" + DEBUG="${DEBUG-}" + ZSH_DEBUG="${ZSH_DEBUG-}" + INIT_CONFIG_VAL="${INIT_CONFIG_VAL-}" + WRAP_CMD="${WRAP_CMD-}" while [[ -n $* ]]; do case "$1" in