alpine-ansible-lint: entrypoint.sh update

This commit is contained in:
Haitao Pan 2024-04-13 18:54:18 +08:00
parent da6fdea701
commit 5aa0bf2fc6
2 changed files with 3 additions and 14 deletions

View File

@ -27,6 +27,6 @@ RUN apk add --no-cache bash git python3 py3-pip jq \
# Set work directory
WORKDIR /src
ADD entrypoint.sh /
ENTRYPOINT [ "/entrypoint.sh" ]
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -3,15 +3,4 @@
# https://issues.jenkins.io/browse/JENKINS-51307?focusedCommentId=341121&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
set -e
echo "Starting entrypoint script..."
# Check if there was a command passed
if [ "$1" ]; then
echo "Executing passed command: $@"
exec "$@"
else
echo "No command provided, running default application..."
# 在这里指定一个默认命令,如果通常没有特定的命令需要执行
exec /bin/bash
fi
exec "$@"