blob: ff8f22d2a189f3a7ab0ed4d20f8cc62cc7ba8b64 [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
11 apt-get install -y gcc
12EOF
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"]