-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 713 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use Python 3.9 slim as base image for smaller size
# Specify platform to ensure compatibility
FROM --platform=$TARGETPLATFORM python:3.9-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY ddns-hosttech.py .
# Copy .env file if it exists (optional)
COPY .env* ./
# Make the script executable
RUN chmod +x ddns-hosttech.py
# Set entrypoint
ENTRYPOINT ["python", "ddns-hosttech.py"]
# Default command (can be overridden at runtime)
# Empty CMD means it will use environment variables from .env file
CMD []