Skip to content

Commit

Permalink
Merge pull request #1159 from felddy/feature/issue-1151
Browse files Browse the repository at this point in the history
Add cache tag file to container cache directory
  • Loading branch information
felddy authored Feb 12, 2025
2 parents bc504bd + 40ac6bc commit e9b8f8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ if [ $install_required = true ]; then
if [[ "${CONTAINER_CACHE:-}" ]]; then
log "Using CONTAINER_CACHE: ${CONTAINER_CACHE}"
mkdir -p "${CONTAINER_CACHE}"
# Create a cache marker file in the cache directory.
cat << END_OF_LINE > "${CONTAINER_CACHE}/CACHEDIR.TAG"
Signature: $(printf ".IsCacheDirectory" | md5sum | cut -d ' ' -f 1)
# This file is a cache directory tag created by the felddy/foundryvtt container
# https://github.com/felddy/foundryvtt-docker
# For information about cache directory tags see https://bford.info/cachedir/
END_OF_LINE
else
log_warn "CONTAINER_CACHE has been unset. Release caching is disabled."
fi
Expand Down

0 comments on commit e9b8f8b

Please sign in to comment.