Skip to content

Commit

Permalink
add any and true options to skip entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Murazaki committed Jan 26, 2025
1 parent 9b4c456 commit 8497c0a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ DOCKER_APP_HOST_CACHE_PATH="${DOCKER_ALL_HOST_DATA_ROOT_PATH:?error}/pixelfed/ca
# @dottie/validate required,boolean
#DOCKER_APP_ENTRYPOINT_SHOW_TEMPLATE_DIFF="1"

# Docker entrypoints that should be skipped on startup
# Docker entrypoints that should be skipped on startup ("any" or "true" skips all)
#ENTRYPOINT_SKIP_SCRIPTS=""

# List of extra APT packages (separated by space) to install when building
Expand Down
10 changes: 9 additions & 1 deletion docker/rootfs/shared/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,16 @@ fi
log-info "looking for shell scripts in [${ENTRYPOINT_D_ROOT}]"

find "${ENTRYPOINT_D_ROOT}" -follow -type f -print | sort -V | while read -r file; do
if in-array "$(get-entrypoint-script-name "any")" skip_scripts; then
log-warning "Skipping script [${file}] since the skip list (\$ENTRYPOINT_SKIP_SCRIPTS) contains any."

continue
elif in-array "$(get-entrypoint-script-name "true")" skip_scripts; then
log-warning "Skipping script [${file}] since the skip list (\$ENTRYPOINT_SKIP_SCRIPTS) contains true."

continue
# Skip the script if it's in the skip-script list
if in-array "$(get-entrypoint-script-name "${file}")" skip_scripts; then
elif in-array "$(get-entrypoint-script-name "${file}")" skip_scripts; then
log-warning "Skipping script [${file}] since it's in the skip list (\$ENTRYPOINT_SKIP_SCRIPTS)"

continue
Expand Down

0 comments on commit 8497c0a

Please sign in to comment.