comparison 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
comparison
equal deleted inserted replaced
2:79160beab2a4 3:0ea626b10557
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 netcat-openbsd
4 4
5 COPY gcp_batch_netcat.py /usr/bin/ 5 # Create galaxy user and home directory
6 COPY gcp_batch_netcat.xml /usr/bin/ 6 RUN useradd -m -s /bin/bash galaxy
7 7
8 ENTRYPOINT ["python3", "/usr/bin/gcp_batch_netcat.py"] 8 # Create a directory for our scripts that galaxy user can access
9 RUN mkdir -p /opt/galaxy-tools && chown galaxy:galaxy /opt/galaxy-tools
10
11 # Create gcloud config directory with proper permissions
12 RUN mkdir -p /home/galaxy/.config/gcloud && \
13 chown -R galaxy:galaxy /home/galaxy/.config && \
14 chmod -R 777 /home/galaxy/.config
15
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
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"]