diff --git a/soul-dist/soul-admin-dist/Dockerfile b/soul-dist/soul-admin-dist/Dockerfile index a395745a58fb..fa8e198d284c 100644 --- a/soul-dist/soul-admin-dist/Dockerfile +++ b/soul-dist/soul-admin-dist/Dockerfile @@ -15,13 +15,22 @@ # limitations under the License. FROM java:openjdk-8-jre-alpine - + ARG APP_NAME -ENV SPRING_PROFILES_ACTIVE h2 + +ARG SPRING_PROFILES_ACTIVE +ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-h2} + ENV LOCAL_PATH /opt/soul-admin ADD target/${APP_NAME}.tar.gz /opt RUN mv /opt/${APP_NAME} ${LOCAL_PATH} +COPY entrypoint.sh ${LOCAL_PATH}/entrypoint.sh +RUN chmod +x ${LOCAL_PATH}/entrypoint.sh + +WORKDIR /opt/soul-admin + EXPOSE 9095 -ENTRYPOINT /bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-admin.out + +ENTRYPOINT ["/bin/sh", "entrypoint.sh"] diff --git a/soul-dist/soul-admin-dist/entrypoint.sh b/soul-dist/soul-admin-dist/entrypoint.sh new file mode 100755 index 000000000000..a828b7de4643 --- /dev/null +++ b/soul-dist/soul-admin-dist/entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[[ -d ./conf-ext ]] && cp -f ./conf-ext/* ./conf + +/bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-admin.out diff --git a/soul-dist/soul-bootstrap-dist/Dockerfile b/soul-dist/soul-bootstrap-dist/Dockerfile index cf30e89c8d04..9b51c599111e 100644 --- a/soul-dist/soul-bootstrap-dist/Dockerfile +++ b/soul-dist/soul-bootstrap-dist/Dockerfile @@ -19,8 +19,17 @@ FROM java:openjdk-8-jre-alpine ARG APP_NAME ENV LOCAL_PATH /opt/soul-bootstrap +ARG SPRING_PROFILES_ACTIVE +ENV SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:-local} + ADD target/${APP_NAME}.tar.gz /opt RUN mv /opt/${APP_NAME} ${LOCAL_PATH} +COPY entrypoint.sh ${LOCAL_PATH}/entrypoint.sh +RUN chmod +x ${LOCAL_PATH}/entrypoint.sh + +WORKDIR ${LOCAL_PATH} + EXPOSE 9195 -ENTRYPOINT /bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-bootstrap.out + +ENTRYPOINT ["/bin/sh", "entrypoint.sh"] diff --git a/soul-dist/soul-bootstrap-dist/entrypoint.sh b/soul-dist/soul-bootstrap-dist/entrypoint.sh new file mode 100755 index 000000000000..58e2315665a9 --- /dev/null +++ b/soul-dist/soul-bootstrap-dist/entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[[ -d ./conf-ext ]] && cp -f ./conf-ext/* ./conf + +/bin/sh ${LOCAL_PATH}/bin/start.sh && tail -f ${LOCAL_PATH}/logs/soul-bootstrap.out