Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make crane use storage directory #423

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading