seattlecitylight-mastodon-bot/Dockerfile
Liam Steckler adb34c8869
Some checks failed
ci/woodpecker/pr/docker-buildx Pipeline failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/vulnerability-scan Pipeline was successful
Use uv
2025-01-11 11:58:05 -08:00

21 lines
No EOL
504 B
Docker

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"]