Initial Dockerfile #73
2 changed files with 48 additions and 0 deletions
27
.dockerignore
Normal file
27
.dockerignore
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
**/__pycache__
|
||||||
|
**/.venv
|
||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
FROM python:3 AS build
|
||||||
|
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN uv venv
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN uv pip install --system -r requirements.txt
|
||||||
|
|
||||||
|
# Copy the project into the intermediate image
|
||||||
|
ADD . /app
|
||||||
|
|
||||||
|
FROM python:3-slim
|
||||||
|
# Copy the environment, but not the source code
|
||||||
|
COPY --from=build --chown=app:app /app/.venv /app/.venv
|
||||||
|
|
||||||
|
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
|
||||||
|
USER appuser
|
||||||
|
|
||||||
|
CMD ["python", "scl.py"]
|
Loading…
Add table
Reference in a new issue