Kubernetes Web View to list and view all Kubernetes resources https://kube-web-view.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM python:3.7-slim
  2. WORKDIR /
  3. RUN pip3 install poetry
  4. COPY poetry.lock /
  5. COPY pyproject.toml /
  6. # fake package to make Poetry happy (we will install the actual contents in the later stage)
  7. RUN mkdir /kube_web && touch /kube_web/__init__.py && touch /README.md
  8. RUN poetry config settings.virtualenvs.create false && \
  9. poetry install --no-interaction --no-dev --no-ansi
  10. FROM python:3.7-slim
  11. WORKDIR /
  12. # copy pre-built packages to this image
  13. COPY --from=0 /usr/local/lib/python3.7/site-packages /usr/local/lib/python3.7/site-packages
  14. # now copy the actual code we will execute (poetry install above was just for dependencies)
  15. COPY kube_web /kube_web
  16. ARG VERSION=dev
  17. # replace build version in package and
  18. # add build version to static asset links to break browser cache
  19. # see also "version" in Makefile
  20. RUN sed -i "s/^__version__ = .*/__version__ = \"${VERSION}\"/" /kube_web/__init__.py && \
  21. sed -i "s/v=[0-9A-Za-z._-]*/v=${VERSION}/g" /kube_web/templates/base.html
  22. ENTRYPOINT ["/usr/local/bin/python", "-m", "kube_web"]