diff --git a/docker/venus/venus-api/Dockerfile.j2 b/docker/venus/venus-api/Dockerfile.j2 index a10e55535e..c5f1641ee0 100644 --- a/docker/venus/venus-api/Dockerfile.j2 +++ b/docker/venus/venus-api/Dockerfile.j2 @@ -5,6 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block venus_api_header %}{% endblock %} +COPY extend_start.sh /usr/local/bin/kolla_venus_extend_start +RUN chmod 644 /usr/local/bin/kolla_venus_extend_start + {% block venus_api_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/venus/venus-api/extend_start.sh b/docker/venus/venus-api/extend_start.sh new file mode 100644 index 0000000000..bbe03bbbcc --- /dev/null +++ b/docker/venus/venus-api/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + venus_manager db sync + exit 0 +fi diff --git a/docker/venus/venus-manager/Dockerfile.j2 b/docker/venus/venus-manager/Dockerfile.j2 index 272a905e67..ae7d215dfd 100644 --- a/docker/venus/venus-manager/Dockerfile.j2 +++ b/docker/venus/venus-manager/Dockerfile.j2 @@ -5,8 +5,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% block venus_manager_header %}{% endblock %} -RUN chmod 644 /usr/local/bin/kolla_venus_extend_start - {% block venus_manager_footer %}{% endblock %} {% block footer %}{% endblock %}