feat: enhance build and entrypoint scripts with improved argument handling and host entry management
This commit is contained in:
@@ -19,7 +19,10 @@ ACCOUNT_NAME=$(echo "$AZURITE_ACCOUNTS" | cut -f 1 -d ';' | cut -f 1 -d ':')
|
||||
|
||||
# Ensure /etc/hosts contains an entry the Azure endpoint names,
|
||||
# so Caddy can route requests to the correct service based on the hostname.
|
||||
sed -i -E "/${ACCOUNT_NAME}/d" /etc/hosts
|
||||
if grep -q "${ACCOUNT_NAME}" /etc/hosts; then
|
||||
cp -a /etc/hosts /etc/hosts.bak && sed -E "/${ACCOUNT_NAME}/d" /etc/hosts > /etc/hosts
|
||||
fi
|
||||
|
||||
cat <<EOF >> /etc/hosts
|
||||
|
||||
127.0.0.1 ${ACCOUNT_NAME}.blob.core.windows.net ${ACCOUNT_NAME}.queue.core.windows.net ${ACCOUNT_NAME}.table.core.windows.net ${ACCOUNT_NAME}.blob.localhost ${ACCOUNT_NAME}.queue.localhost ${ACCOUNT_NAME}.table.localhost
|
||||
|
||||
Reference in New Issue
Block a user