diff --git a/entrypoint.sh b/entrypoint.sh index ee55ecf..2e106a1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,7 +10,7 @@ env | grep -v -E "^(#|;| |PATH|SHLVL|HOSTNAME|DOCKER_*)" | awk '$1 ~ /^\w+=/' | # login to container registry if [ -n "${INPUT_USERNAME}" ]; then - echo "${INPUT_PASSWORD}" | docker login "${INPUT_REGISTRY}" -u "${INPUT_USERNAME}" --password-stdin + printf '%s' "${INPUT_PASSWORD}" | docker login "${INPUT_REGISTRY}" -u "${INPUT_USERNAME}" --password-stdin fi # set custom network @@ -24,19 +24,19 @@ if [ "${INPUT_MOUNT_SOCKET,,}" == "true" ]; then fi # map volumes -mapfile -t TMP_VOLUMES < <(printf ${INPUT_VOLUMES}) +mapfile -t TMP_VOLUMES < <(printf '%b' "${INPUT_VOLUMES}") for vol in "${TMP_VOLUMES[@]}"; do RUNTIME_OPTIONS+=(--volume "${vol}") done # get custom options -mapfile -t TMP_OPTIONS < <(printf ${INPUT_OPTIONS}) +mapfile -t TMP_OPTIONS < <(printf '%b' "${INPUT_OPTIONS}") for opt in "${TMP_OPTIONS[@]}"; do CUSTOM_OPTIONS+=("${opt}") done # get run command -mapfile -t TMP_RUN < <(printf ${INPUT_RUN}) +mapfile -t TMP_RUN < <(printf '%b' "${INPUT_RUN}") for cmd in "${TMP_RUN[@]}"; do RUN_COMMAND+=("${cmd}") done