Skip to content

Commit

Permalink
fix: make crane use storage directory
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Nov 21, 2023
1 parent bf596e6 commit 3786768
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion oci/private/registry/crane_launcher.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ readonly SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
readonly CRANE_REGISTRY_BIN="${SCRIPT_DIR}/{{CRANE}}"

function start_registry() {
local __unused_storage_dir="$1"
local storage_dir="$1"
local output="$2"
local deadline="${3:-5}"
mkdir -p "${storage_dir}"
# --blobs-to-disk uses go's os.TempDir() function which is equal to TMPDIR under *nix.
# https://pkg.go.dev/os#TempDir
TMPDIR="${storage_dir}" TMP="${storage_dir}" \
"${CRANE_REGISTRY_BIN}" registry serve --blobs-to-disk >> $output 2>&1 &
local timeout=$((SECONDS+${deadline}))
Expand Down

0 comments on commit 3786768

Please sign in to comment.