blob: 7c2ffd3876e1b9db39c24a4631997553dd1e4dc9 [file] [log] [blame]
Mohammed Naserd531f362022-09-16 11:38:55 -04001# syntax=docker/dockerfile-upstream:master-labs
2
3FROM python:3.10-slim AS poetry
4RUN --mount=type=cache,target=/root/.cache <<EOF
5 pip install poetry
6EOF
7
8FROM poetry AS builder
Mohammed Naser124a9bc2022-09-19 15:13:16 -04009RUN <<EOF
10 apt-get update
Mohammed Naser6d62c4c2022-10-13 17:41:24 +000011 apt-get install -y build-essential
Mohammed Naser124a9bc2022-09-19 15:13:16 -040012EOF
Mohammed Naserd531f362022-09-16 11:38:55 -040013WORKDIR /app
Mohammed Naser16765f02022-09-30 14:56:47 +000014ADD poetry.lock /app
15ADD pyproject.toml /app
Mohammed Naserd531f362022-09-16 11:38:55 -040016ENV POETRY_VIRTUALENVS_IN_PROJECT=true
Mohammed Naser16765f02022-09-30 14:56:47 +000017RUN poetry install --only main --no-root --no-interaction
18ADD . /app
Mohammed Naserd531f362022-09-16 11:38:55 -040019RUN poetry install --only main --no-interaction
20
21FROM python:3.10-slim AS runtime
22ENV PATH="/app/.venv/bin:$PATH"
23COPY --from=builder --link /app /app
24CMD ["atmosphere-operator"]