Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Dec 7, 2024
1 parent 914378d commit 4152028
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
lib
venv
libs/rpi-rgb-led-matrix/fonts
libs/rpi-rgb-led-matrix/images
libs/rpi-rgb-led-matrix/bindings/python/build
images/backgrounds/*
images/weather/*
28 changes: 24 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
FROM python:3.10
ARG base_image="python"
ARG base_tag="3.10"
ARG uid="1000"

COPY . /app
FROM ${base_image}:${base_tag} AS build
ARG uid

COPY ./pyproject.toml ./poetry.lock /app/
WORKDIR /app

RUN python -m venv /venv && \
python -m pip install --upgrade pip poetry && \
poetry install
/venv/bin/python -m pip install --upgrade pip poetry
RUN . /venv/bin/activate && poetry install

COPY . /app
RUN . /venv/bin/activate && ls /app && cd /app/lib/rpi-rgb-led-matrix && make build-python

RUN chown -R ${uid} /app

FROM ${base_image}:${base_tag} AS runtime
ARG uid

COPY --from=build /venv /venv
COPY --from=build /app /app

WORKDIR /app
USER ${uid}

CMD ["/venv/bin/python", "-m", "wideboy"]

0 comments on commit 4152028

Please sign in to comment.