Commit 37581517 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Changed CentOS version to 7 since it seems that CentOS 8 EOL is at the end of...


Changed CentOS version to 7 since it seems that CentOS 8 EOL is at the end of 2021 + switched to Python 3.9.1.

Signed-off-by: default avatarCristiano Urban <cristiano.urban@inaf.it>
parent 67ed55f3
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
# Use python 3 as base image
FROM python:3
# Use python 3.9.1-slim as base image
FROM python:3.9.1-slim

# Install psql client to be able to connect manually to the file_catalog container
# Install also redis-tools to be able to access the redis container via redis-cli
@@ -18,4 +18,4 @@ WORKDIR /home/client/
COPY *.py ./

# Install python dependencies
RUN pip install --no-cache-dir pika
RUN pip3.9 install --no-cache-dir pika
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ services:
    - backend_net
    stdin_open: true
    tty: true
    command: ["./wait-for-it.sh", "rabbitmq:5672", "--timeout=30", "--", "python3", "transfer_service.py"]
    command: ["./wait-for-it.sh", "rabbitmq:5672", "--timeout=30", "--", "python3.9", "transfer_service.py"]
  client:
    image: git.ia2.inaf.it:5050/ia2/vospace-transfer-service/client
    build: ./client
+17 −9
Original line number Diff line number Diff line
# Use CentOS 8 as base image
FROM centos:8
# Use CentOS 7 as base image
FROM centos:7

# Create a new user called transfer_service, create the home directory and set the default shell
RUN useradd -m -s /bin/bash transfer_service
@@ -19,13 +19,21 @@ RUN chown transfer_service wait-for-it.sh *.py && \
    chmod 755 wait-for-it.sh *.py        

# Install epel repo
RUN dnf update -y && dnf -y install epel-release
RUN yum update -y && yum -y install epel-release

# Install nano and openssh
RUN dnf -y install nano openssh-clients
# Install make, nano, openssh and wget
RUN yum -y install make nano openssh-clients wget

# Install pika, redis, psycopg2 and paramiko
RUN dnf -y install python3-pika python3-redis python3-psycopg2 python3-paramiko
# Install python 3.9.1
RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel zlib-devel && \
    wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz && \
    tar xzf Python-3.9.1.tgz && \
    cd Python-3.9.1 && \
    ./configure --enable-optimizations && \
    make altinstall && cd .. && rm Python-3.9.1.tgz
    
# Install pika, redis, psycopg2 and paramiko Python packages
RUN pip3.9 install --no-cache-dir pika redis psycopg2-binary paramiko
    
# Run commands as transfer_service user
#USER transfer_service