You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the first image build and and container run with the the environment variable PROFILE_NAME=control-plane or PROFILE_NAME=gateway-worker it works ok. However when the container is restarted, an error occurs because the script sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} is executed again.
I solved this problem, removing the lines from docker-entrypoint.sh files:
# optimize WSO2 Carbon Server, if the profile name is defined as an environment variableif [[ !-z"${PROFILE_NAME}" ]]
thenecho"Optimizing WSO2 Carbon Server">&2
sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME}fi
Adding the lines to the Dockerfile files:
# optimize WSO2 Carbon Server, if the profile name is defined as an environment variable
ARG PROFILE_NAME
ENV PROFILE_NAME=${PROFILE_NAME}
RUN if [ ! -z "$PROFILE_NAME" ] ; then sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} ; fi
And executing the build with arguments instead of ENV variable:
Description:
For the first image build and and container run with the the environment variable PROFILE_NAME=control-plane or PROFILE_NAME=gateway-worker it works ok. However when the container is restarted, an error occurs because the script
sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME}
is executed again.I solved this problem, removing the lines from docker-entrypoint.sh files:
Adding the lines to the Dockerfile files:
And executing the build with arguments instead of ENV variable:
Suggested Labels:
Suggested Assignees:
Affected Product Version:
Docker container wso2am-4.1.0
Steps to reproduce:
Restart a docker container with ENV variable PROFILE_NAME=control-plane or PROFILE_NAME=gateway-worker
Related Issues:
The text was updated successfully, but these errors were encountered: