Mercurial > repos > enis > gcp_batch_netcat
annotate 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 |
rev | line source |
---|---|
0
7852c0efafd7
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
diff
changeset
|
1 FROM google/cloud-sdk:latest |
7852c0efafd7
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
diff
changeset
|
2 |
7852c0efafd7
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
diff
changeset
|
3 RUN apt-get update && apt-get install -y python3 netcat-openbsd |
7852c0efafd7
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
diff
changeset
|
4 |
3
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
5 # Create galaxy user and home directory |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
6 RUN useradd -m -s /bin/bash galaxy |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
7 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
8 # Create a directory for our scripts that galaxy user can access |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
9 RUN mkdir -p /opt/galaxy-tools && chown galaxy:galaxy /opt/galaxy-tools |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
10 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
11 # Create gcloud config directory with proper permissions |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
12 RUN mkdir -p /home/galaxy/.config/gcloud && \ |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
13 chown -R galaxy:galaxy /home/galaxy/.config && \ |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
14 chmod -R 777 /home/galaxy/.config |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
15 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
16 # Also create a temporary gcloud config directory as backup |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
17 RUN mkdir -p /tmp/gcloud-config && chmod 777 /tmp/gcloud-config |
0
7852c0efafd7
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
diff
changeset
|
18 |
3
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
19 # Copy files to the galaxy-accessible directory |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
20 COPY gcp_batch_netcat.py /opt/galaxy-tools/ |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
21 COPY gcp_batch_netcat.xml /opt/galaxy-tools/ |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
22 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
23 # Ensure galaxy user can execute the script |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
24 RUN chown galaxy:galaxy /opt/galaxy-tools/* && chmod +x /opt/galaxy-tools/gcp_batch_netcat.py |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
25 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
26 # Switch to galaxy user |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
27 USER galaxy |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
28 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
29 # Set environment variables for gcloud configuration |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
30 ENV CLOUDSDK_CONFIG=/tmp/gcloud-config |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
31 ENV HOME=/home/galaxy |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
32 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
33 # Set working directory |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
34 WORKDIR /opt/galaxy-tools |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
35 |
0ea626b10557
planemo upload for repository https://github.com/afgane/gcp_batch_netcat
enis
parents:
0
diff
changeset
|
36 ENTRYPOINT ["python3", "/opt/galaxy-tools/gcp_batch_netcat.py"] |