From 6156fb397f6e6cea57c902f3bbd07f39cf8423ed Mon Sep 17 00:00:00 2001 From: Jeanne Cheneby Date: Tue, 5 Nov 2024 10:48:25 +0100 Subject: [PATCH] feat: include entrypoint into docker --- Dockerfile | 7 +++++++ entrypoint.sh | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 160217c..ee32af5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,11 @@ RUN chown -R galaxy:galaxy /database RUN mkdir /study RUN chown 777 /study +# Import the entrypoint script +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +RUN chown galaxy:galaxy /entrypoint.sh + # switch back to galaxy USER galaxy @@ -65,3 +70,5 @@ RUN sed -i 's|^[[:space:]]*tool_dependency_dir:.*|#&|' config/galaxy.yml RUN pip install pandas matplotlib seaborn numpy scipy galaxy-lib numba dsnparse mysqlclient python-dotenv + + diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..6aa7ffb --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Clear the set_env.sh file +touch /galaxy/server/tools/plot_clusters_prevalence/.env + +# Write the environment variables into the set_env.sh file +echo "UPLOAD_IMAGE_ENDPOINT=${UPLOAD_IMAGE_ENDPOINT}" >> /galaxy/server/tools/export_cbioportal_image/.env +echo "CBIOPORTAL_LOAD_RESOURCE_ENDPOINT=${CBIOPORTAL_LOAD_RESOURCE_ENDPOINT}" >> /galaxy/server/tools/export_cbioportal_image/.env +echo "IMAGE_BASE_URL=${IMAGE_BASE_URL}" >> /galaxy/server/tools/export_cbioportal_image/.env + +touch /galaxy/server/tools/export_cbioportal_timeline/.env + +echo "EXPORT_TIMELINE_ENDPOINT=${EXPORT_TIMELINE_ENDPOINT}" >> /galaxy/server/tools/export_cbioportal_timeline/.env + + + + +# Pass control to the default command or any other command specified +exec "$@"