Loading base/Dockerfile +2 −2 Original line number Diff line number Diff line Loading @@ -10,8 +10,8 @@ FROM centos:7 # Install epel repo RUN yum update -y && yum -y install epel-release # Install make, nano, openssh, wget, rsync and cronie RUN yum -y install make nano openssh-clients wget rsync cronie # Install make, nano, openssh, wget, rsync, cronie and sudo RUN yum -y install make nano openssh-clients wget rsync cronie sudo # Install python 3.9.7 RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel zlib-devel && \ Loading docker-compose.yml +2 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ version: '3.0' services: base: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base build: ./base container_name: base redis: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/job_cache Loading Loading @@ -45,7 +46,7 @@ services: - backend_net stdin_open: true tty: true command: ["./wait-for-it.sh", "postgres:5432", "--timeout=30", "--", "bash", "start.sh"] command: ["./wait-for-it.sh", "postgres:5432", "--timeout=30", "--", "sudo", "bash", "start.sh"] client: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/client build: ./client Loading transfer_service/Dockerfile +6 −1 Original line number Diff line number Diff line Loading @@ -7,8 +7,10 @@ # Use 'base' as base image FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base # Create a new user called transfer_service, create the home directory and set the default shell # Create a new user called transfer_service, create the home directory, set the default shell # and add it to /etc/sudoers RUN useradd -m -s /bin/bash transfer_service RUN echo "transfer_service ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # Test users RUN useradd -m -s /bin/bash sonia.zorba Loading Loading @@ -63,5 +65,8 @@ RUN mkdir /home/cristiano.urban/store /home/cristiano.urban/retrieve && \ chmod -R 755 /home/sonia.zorba/store && \ chmod -R 755 /home/sonia.zorba/retrieve # Switch to 'transfer_service' user USER transfer_service # Run a shell CMD /bin/bash transfer_service/start.sh +1 −1 Original line number Diff line number Diff line Loading @@ -15,4 +15,4 @@ do chmod -R 755 /mnt/hot_storage/users/${user} done crond && python3.9 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log crond && /usr/local/bin/python3.9 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log Loading
base/Dockerfile +2 −2 Original line number Diff line number Diff line Loading @@ -10,8 +10,8 @@ FROM centos:7 # Install epel repo RUN yum update -y && yum -y install epel-release # Install make, nano, openssh, wget, rsync and cronie RUN yum -y install make nano openssh-clients wget rsync cronie # Install make, nano, openssh, wget, rsync, cronie and sudo RUN yum -y install make nano openssh-clients wget rsync cronie sudo # Install python 3.9.7 RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel zlib-devel && \ Loading
docker-compose.yml +2 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ version: '3.0' services: base: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base build: ./base container_name: base redis: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/job_cache Loading Loading @@ -45,7 +46,7 @@ services: - backend_net stdin_open: true tty: true command: ["./wait-for-it.sh", "postgres:5432", "--timeout=30", "--", "bash", "start.sh"] command: ["./wait-for-it.sh", "postgres:5432", "--timeout=30", "--", "sudo", "bash", "start.sh"] client: image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/client build: ./client Loading
transfer_service/Dockerfile +6 −1 Original line number Diff line number Diff line Loading @@ -7,8 +7,10 @@ # Use 'base' as base image FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base # Create a new user called transfer_service, create the home directory and set the default shell # Create a new user called transfer_service, create the home directory, set the default shell # and add it to /etc/sudoers RUN useradd -m -s /bin/bash transfer_service RUN echo "transfer_service ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # Test users RUN useradd -m -s /bin/bash sonia.zorba Loading Loading @@ -63,5 +65,8 @@ RUN mkdir /home/cristiano.urban/store /home/cristiano.urban/retrieve && \ chmod -R 755 /home/sonia.zorba/store && \ chmod -R 755 /home/sonia.zorba/retrieve # Switch to 'transfer_service' user USER transfer_service # Run a shell CMD /bin/bash
transfer_service/start.sh +1 −1 Original line number Diff line number Diff line Loading @@ -15,4 +15,4 @@ do chmod -R 755 /mnt/hot_storage/users/${user} done crond && python3.9 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log crond && /usr/local/bin/python3.9 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log