You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kmftools/WeatherApp/Dockerfile

30 lines
741 B

# Gebruik een officiële Python-image als basis
FROM python:3.9-slim
RUN apt-get update && apt-get -y install cron nano
# Werkdirectory instellen
WORKDIR /app
# Kopieer je Python-bestanden naar de container
COPY . /app
# Kopieer de requirements.txt naar de container
COPY requirements.txt .
# Kopieer de requirements.txt naar de container
COPY .env .
# Installeer de vereiste Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Installeer cron en zorg ervoor dat de cron-demon actief is
RUN apt-get update && apt-get install -y cron
RUN touch /var/log/cron.log
# Voeg start.sh toe
COPY start.sh /start.sh
RUN chmod +x /start.sh
# Gebruik start.sh om zowel cron als currentprice.py te starten
CMD ["/start.sh"]