- Changelog started. Existing version 0.0.2 - Add section for application wide TODOs. Each moved to changelog when done - Adjusted .gitignore and .dockerignore - Updated image base to python:3.10-slim-trixie. Cleaned up image build. - Added default environment values to compose file - Cleaned up pyproject.toml. - Deleted unused gui-tk.py.
27 lines
794 B
Docker
27 lines
794 B
Docker
# Dockerfile
|
|
FROM python:3.10-slim-trixie
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Apply security updates
|
|
RUN apt update && apt-get install -y --only-upgrade $(apt-get --just-print upgrade | awk 'tolower($4) ~ /.*security.*/ || tolower($5) ~ /.*security.*/ {print $2}' | sort | uniq) && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir hatch
|
|
|
|
# Copy first part of project that needs to be rebuilt
|
|
# if it changes
|
|
COPY ./pyproject.toml ./src /app/
|
|
|
|
# Pre-installed files needed at runtime
|
|
RUN hatch env create default -- --no-cache-dir
|
|
|
|
# Copy the rest of the project; readme and license
|
|
COPY ./README.md ./LICENSE /app/
|
|
|
|
# Expose the default port the app runs on
|
|
EXPOSE 5232
|
|
|
|
# Command to run the app
|
|
CMD ["hatch","run","subdomain_server","--config-path","/app/config/config.yaml"]
|