comparison Dockerfile @ 4:2ff4a39ea41b draft

planemo upload commit 1bf6938d35be8e67e317f504f43f281ce7dc06e6
author enis
date Tue, 22 Jul 2025 14:47:47 +0000
parents 0ea626b10557
children b2ce158b4f22
comparison
equal deleted inserted replaced
3:0ea626b10557 4:2ff4a39ea41b
1 FROM google/cloud-sdk:latest 1 FROM google/cloud-sdk:latest
2 2
3 RUN apt-get update && apt-get install -y python3 netcat-openbsd 3 RUN apt-get update && apt-get install -y python3 python3-pip netcat-openbsd
4 4
5 # Create galaxy user and home directory 5 RUN pip3 install --break-system-packages google-cloud-batch
6 RUN useradd -m -s /bin/bash galaxy
7 6
8 # Create a directory for our scripts that galaxy user can access 7 RUN groupadd -g 10001 galaxy && useradd -u 10001 -g 10001 -m -s /bin/bash galaxy
9 RUN mkdir -p /opt/galaxy-tools && chown galaxy:galaxy /opt/galaxy-tools
10 8
11 # Create gcloud config directory with proper permissions 9 # Add bash alias for ll
12 RUN mkdir -p /home/galaxy/.config/gcloud && \ 10 RUN echo "alias ll='ls -l'" >> /home/galaxy/.bashrc && \
13 chown -R galaxy:galaxy /home/galaxy/.config && \ 11 chown galaxy:galaxy /home/galaxy/.bashrc
14 chmod -R 777 /home/galaxy/.config
15 12
16 # Also create a temporary gcloud config directory as backup
17 RUN mkdir -p /tmp/gcloud-config && chmod 777 /tmp/gcloud-config
18
19 # Copy files to the galaxy-accessible directory
20 COPY gcp_batch_netcat.py /opt/galaxy-tools/
21 COPY gcp_batch_netcat.xml /opt/galaxy-tools/
22
23 # Ensure galaxy user can execute the script
24 RUN chown galaxy:galaxy /opt/galaxy-tools/* && chmod +x /opt/galaxy-tools/gcp_batch_netcat.py
25
26 # Switch to galaxy user
27 USER galaxy 13 USER galaxy
28
29 # Set environment variables for gcloud configuration
30 ENV CLOUDSDK_CONFIG=/tmp/gcloud-config
31 ENV HOME=/home/galaxy
32
33 # Set working directory
34 WORKDIR /opt/galaxy-tools
35
36 ENTRYPOINT ["python3", "/opt/galaxy-tools/gcp_batch_netcat.py"]