kube-escape/Dockerfile

23 lines
462 B
Docker
Raw Permalink Normal View History

FROM python:3.12 AS base
FROM base AS python-deps
# Install pipenv and compilation dependencies
RUN pip install pipenv
# Install python dependencies in /.venv
COPY Pipfile Pipfile.lock ./
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
FROM base AS runtime
# Copy virtual env from python-deps stage
COPY --from=python-deps /.venv /.venv
ENV PATH="/.venv/bin:$PATH"
# Install application into container
COPY . .
# Run the application
CMD ["./pod.py"]