registry support Mac (#11960)

This commit is contained in:
diguage
2025-03-22 00:04:39 +08:00
committed by GitHub
parent 247b45bca6
commit ae583e2a28

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
OPTION=$1 OPTION=$1
CURRENT_DIR=$(cd $(dirname $0); pwd) CURRENT_DIR=$(cd $(dirname $0); pwd)
@@ -118,6 +118,8 @@ function register_container_images() {
cp ${CURRENT_DIR}/registries.conf ${TEMP_DIR}/registries.conf cp ${CURRENT_DIR}/registries.conf ${TEMP_DIR}/registries.conf
sed -i s@"HOSTNAME"@"$(hostname)"@ ${TEMP_DIR}/registries.conf sed -i s@"HOSTNAME"@"$(hostname)"@ ${TEMP_DIR}/registries.conf
sudo cp ${TEMP_DIR}/registries.conf /etc/containers/registries.conf sudo cp ${TEMP_DIR}/registries.conf /etc/containers/registries.conf
elif [ "$(uname)" == "Darwin" ]; then
echo "This is a Mac, no configuration changes are required"
else else
echo "runtime package(docker-ce, podman, nerctl, etc.) should be installed" echo "runtime package(docker-ce, podman, nerctl, etc.) should be installed"
exit 1 exit 1