Clean up (delete) Kubernetes resources after a configured TTL (time to live)
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.

27 lines
644 B

FROM python:3.8-slim
RUN pip3 install poetry
COPY poetry.lock /
COPY pyproject.toml /
RUN poetry config virtualenvs.create false && \
poetry install --no-interaction --no-dev --no-ansi
FROM python:3.8-slim
# copy pre-built packages to this image
COPY --from=0 /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
# now copy the actual code we will execute (poetry install above was just for dependencies)
COPY kube_janitor /kube_janitor
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /kube_janitor/
ENTRYPOINT ["python3", "-m", "kube_janitor"]