# Use python 3 as base image
FROM python:3

# 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
RUN apt-get -y update && apt-get -y install postgresql-client && apt-get -y install redis-tools 

# Create a new user called 'client', create the home directory and set the default shell
RUN useradd -m -s /bin/bash client

# Run commands as 'client' user
USER client

# Set up a workdir for the container
WORKDIR /home/client/

# Copy the source code of all client apps
COPY *.py ./

# Install python dependencies
RUN pip install --no-cache-dir pika
