Skip to content

Instantly share code, notes, and snippets.

View gtoselli's full-sized avatar
🎯
Focusing

Gabriele Toselli gtoselli

🎯
Focusing
View GitHub Profile
@gtoselli
gtoselli / !check_env.sh
Last active November 17, 2021 17:44
Docker ENTRYPOINT for env check before container start
#!/bin/bash
echo "Environment variables check:"
declare -a unset=()
while IFS= read -r line
do
var_name="${line//=}"
if [[ -z "${!var_name+x}" ]]; then