diff --git a/docker/apphub/Dockerfile b/docker/apphub/Dockerfile index 7df27274..bc70cb8f 100644 --- a/docker/apphub/Dockerfile +++ b/docker/apphub/Dockerfile @@ -48,6 +48,5 @@ RUN rm -rf apphub/docs apphub/tests library.zip plugin-appstore && \ apt clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc /usr/share/doc-base - EXPOSE 8080 ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/docker/apphub/config/entrypoint.sh b/docker/apphub/config/entrypoint.sh index fd8ae6b5..e735ab1c 100644 --- a/docker/apphub/config/entrypoint.sh +++ b/docker/apphub/config/entrypoint.sh @@ -5,10 +5,10 @@ set -e try_times=3 # set git user and email for ((i=0; i<$try_times; i++)); do - ( - username=$(apphub getconfig --section gitea --key user_name) - email=$(apphub getconfig --section gitea --key email) - ) || true + set +e + username=$(apphub getconfig --section gitea --key user_name) + email=$(apphub getconfig --section gitea --key email) + set -e if [ -n "$username" ] && [ -n "$email" ]; then break fi