Skip to content

Commit

Permalink
fix: listen on loopback address
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Dec 18, 2023
1 parent 7392c5b commit d7795b2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions oci/private/registry/crane_launcher.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ function start_registry() {
local registry_pid="$1/proc.pid"
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 &
"${CRANE_REGISTRY_BIN}" registry serve --disk="${storage_dir}" --address=localhost:0 >> $output 2>&1 &
echo "$!" > "${registry_pid}"
local timeout=$((SECONDS+${deadline}))

while [ "${SECONDS}" -lt "${timeout}" ]; do
Expand Down

0 comments on commit d7795b2

Please sign in to comment.