perefouras/docker/Dockerfile
2025-01-23 15:01:40 +00:00

24 lines
591 B
Docker

# 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"]