feat: enhance build and entrypoint scripts with improved argument handling and host entry management

This commit is contained in:
2026-02-28 10:36:36 +01:00
parent ae7542100b
commit aa9274aca3
2 changed files with 55 additions and 3 deletions

View File

@@ -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