added dockerfile for bot hosting
This commit is contained in:
parent
cae9aace56
commit
eaf92abff0
23
docker/Dockerfile
Normal file
23
docker/Dockerfile
Normal file
@ -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"]
|
Loading…
x
Reference in New Issue
Block a user