Dockerfile 826 B

12345678910111213141516171819
  1. FROM python:3.9-slim
  2. RUN apt update && apt install openssh-server sudo vim less ack-grep rsync wget curl bash -y && rm -rf /var/lib/apt/lists/*
  3. # We use Poetry for dependency management
  4. RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
  5. cd /usr/local/bin && \
  6. ln -s /opt/poetry/bin/poetry && \
  7. poetry config virtualenvs.create false
  8. WORKDIR /app
  9. COPY ./pyproject.toml ./poetry.lock* main.py ./
  10. RUN poetry install --no-root
  11. # do not show reload warning popup (see https://github.com/elimintz/justpy/issues/236#issuecomment-799431208)
  12. RUN sed -i "s/confirm('Page needs to be reloaded, click OK to reload')/true/g" /usr/local/lib/python3.9/site-packages/justpy/templates/main.html
  13. CMD uvicorn --reload --host 0.0.0.0 --port 80 main:ui