initial commit

This commit is contained in:
2026-09-04 14:02:15 -04:00
commit ab192231d8
10 changed files with 310 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# any command returning non-zero, should end this script
set -e
# cycle through *.sh in `opt/containerd` in alphabetical order; executing each one
CONTAINERD_FILES=( /opt/containerd/*.sh )
if (( ${#CONTAINERD_FILES[@]} > 1 )); then
for (( CONTAINERD_FILEINDEX = 0; CONTAINERD_FILEINDEX < ${#CONTAINERD_FILES[@]}; CONTAINERD_FILEINDEX++ )); do
CONTAINERD_FILE=${CONTAINERD_FILES[${CONTAINERD_FILEINDEX}]}
if [[ ${CONTAINERD_FILE} != "/opt/containerd/entrypoint.sh" ]]; then
echo "Executing entrypoint: ${CONTAINERD_FILE}"
. ${CONTAINERD_FILE}
fi
done
fi
# if there are arguments to the entrypoint, execute them to finish
# like a server startup command
if (( $# > 0 )); then
echo "Executing entrypoint ..."
exec "$@"
fi