Dockerfile 680 B

1234567891011121314151617181920212223242526
  1. # Use an official Python image as a base
  2. FROM python:3.9-slim
  3. # Set the working directory to /app
  4. WORKDIR /app
  5. # Copy the script into the container
  6. COPY ip_notifier.py requirements.txt /app/
  7. # Update pip to the latest version
  8. RUN pip install --upgrade pip
  9. # Install the required dependencies
  10. RUN pip install -r requirements.txt
  11. # Expose the port (not needed in this case, but good practice)
  12. EXPOSE 80
  13. # Create a volume for the config file
  14. VOLUME /app/config
  15. # - /home/yazoo/appdev/dynip/config/config.ini:/app/config.ini
  16. # - /home/yazoo/appdev/dynip/config/last_ip.txt:/app/last_ip.txt
  17. # Run the command when the container starts
  18. CMD ["python", "ip_notifier.py"]