diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..ce5bc56 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +# Dockerfile +FROM python:3.9-slim + +# Set the working directory +WORKDIR /app + +# Install git and clean up +RUN apt-get update -q && \ + apt-get install -y git && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Clone the repository +RUN git clone --single-branch --branch master https://git.epicsparrow.com/Anselme/perefouras.git . + +# Install dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# give exec permissions to main +RUN chmod +x main.py + +# Command to update the repo and run the script +CMD ["sh", "-c", "cd /app && git pull origin master && python main.py"]