mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-05 16:23:39 +00:00
Use python:3.11-slim-buster base for now
This commit is contained in:
11
.dockerignore
Normal file
11
.dockerignore
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
|
.vscode
|
||||||
|
.mypy_cache
|
||||||
|
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
24
Dockerfile
24
Dockerfile
@@ -1,23 +1,11 @@
|
|||||||
FROM cgr.dev/chainguard/python:dev-3.11.1 as builder
|
# syntax=docker/dockerfile:1
|
||||||
|
FROM python:3.11-slim-buster
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY pyproject.toml .
|
COPY . .
|
||||||
COPY poetry.lock .
|
|
||||||
COPY rfd_notify .
|
|
||||||
|
|
||||||
RUN pip install poetry==1.3.2 && \
|
RUN pip install --no-cache-dir poetry==1.3.2 && \
|
||||||
/home/nonroot/.local/bin/poetry export -f requirements.txt > /tmp/requirements.txt
|
poetry install --no-root
|
||||||
|
|
||||||
RUN pip install -r /tmp/requirements.txt --user
|
ENTRYPOINT ["poetry", "run", "-C", "/app", "python", "/app/rfd_notify/cli.py", "-c", "config.yml"]
|
||||||
|
|
||||||
FROM cgr.dev/chainguard/python:3.11.1
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Make sure you update Python version in path
|
|
||||||
COPY --from=builder /home/nonroot/.local/lib/python3.11/site-packages /home/nonroot/.local/lib/python3.11/site-packages
|
|
||||||
|
|
||||||
COPY rfd_notify .
|
|
||||||
|
|
||||||
ENTRYPOINT ["python", "/app/cli.py", "-c", "config.yml"]
|
|
||||||
|
Reference in New Issue
Block a user