Mercurial > repos > enis > gcp_batch_netcat
diff Dockerfile @ 3:0ea626b10557 draft
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
author | enis |
---|---|
date | Mon, 21 Jul 2025 15:13:09 +0000 |
parents | 7852c0efafd7 |
children | 2ff4a39ea41b |
line wrap: on
line diff
--- a/Dockerfile Tue Jul 15 21:10:05 2025 +0000 +++ b/Dockerfile Mon Jul 21 15:13:09 2025 +0000 @@ -2,7 +2,35 @@ RUN apt-get update && apt-get install -y python3 netcat-openbsd -COPY gcp_batch_netcat.py /usr/bin/ -COPY gcp_batch_netcat.xml /usr/bin/ +# Create galaxy user and home directory +RUN useradd -m -s /bin/bash galaxy + +# Create a directory for our scripts that galaxy user can access +RUN mkdir -p /opt/galaxy-tools && chown galaxy:galaxy /opt/galaxy-tools + +# Create gcloud config directory with proper permissions +RUN mkdir -p /home/galaxy/.config/gcloud && \ + chown -R galaxy:galaxy /home/galaxy/.config && \ + chmod -R 777 /home/galaxy/.config + +# Also create a temporary gcloud config directory as backup +RUN mkdir -p /tmp/gcloud-config && chmod 777 /tmp/gcloud-config -ENTRYPOINT ["python3", "/usr/bin/gcp_batch_netcat.py"] +# Copy files to the galaxy-accessible directory +COPY gcp_batch_netcat.py /opt/galaxy-tools/ +COPY gcp_batch_netcat.xml /opt/galaxy-tools/ + +# Ensure galaxy user can execute the script +RUN chown galaxy:galaxy /opt/galaxy-tools/* && chmod +x /opt/galaxy-tools/gcp_batch_netcat.py + +# Switch to galaxy user +USER galaxy + +# Set environment variables for gcloud configuration +ENV CLOUDSDK_CONFIG=/tmp/gcloud-config +ENV HOME=/home/galaxy + +# Set working directory +WORKDIR /opt/galaxy-tools + +ENTRYPOINT ["python3", "/opt/galaxy-tools/gcp_batch_netcat.py"]