Check if Entrypoint Dir exists & run all executable
This commit is contained in:
parent
de38960e27
commit
ea578b81f2
@ -20,11 +20,11 @@ fi
|
|||||||
|
|
||||||
# Allow users to have scripts run on container startup to prepare workspace.
|
# Allow users to have scripts run on container startup to prepare workspace.
|
||||||
# https://github.com/coder/code-server/issues/5177
|
# https://github.com/coder/code-server/issues/5177
|
||||||
chmod u+x ${ENTRYPOINTD}/*.sh
|
if [ -d "${ENTRYPOINTD}" ]; then
|
||||||
sudo chown -R ${USER} ${ENTRYPOINTD}/*
|
for f in $(find "${ENTRYPOINTD}" -type f -executable); do
|
||||||
for f in "${ENTRYPOINTD}"/*.sh; do
|
echo "Running Entrypoint: ${f}"
|
||||||
echo "Running Entrypoint: ${f}"
|
"${f}"
|
||||||
bash "${f}"
|
done
|
||||||
done
|
fi
|
||||||
|
|
||||||
exec dumb-init /usr/bin/code-server "$@"
|
exec dumb-init /usr/bin/code-server "$@"
|
||||||
|
Reference in New Issue
Block a user