This commit is contained in:
24
Dockerfile
24
Dockerfile
@ -5,33 +5,43 @@ RUN --mount=type=cache,target=/var/cache/apk \
|
||||
|
||||
|
||||
|
||||
FROM core as check
|
||||
FROM core as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install poethepoet
|
||||
|
||||
COPY ./poetry.lock ./pyproject.toml poetry.toml ./
|
||||
COPY ./poetry.lock ./pyproject.toml ./poetry.toml ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry\
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
||||
poetry install --sync
|
||||
|
||||
COPY ./test ./test
|
||||
COPY ./dj-embe ./dj-embe
|
||||
|
||||
|
||||
|
||||
FROM build as check
|
||||
|
||||
RUN poe lint
|
||||
#RUN poe test
|
||||
|
||||
|
||||
|
||||
FROM core as build
|
||||
FROM build as test
|
||||
|
||||
RUN poe test
|
||||
|
||||
|
||||
|
||||
FROM core as run
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./poetry.lock ./pyproject.toml poetry.toml ./
|
||||
COPY ./poetry.lock ./pyproject.toml ./poetry.toml ./
|
||||
COPY ./dj-embe ./dj-embe
|
||||
|
||||
RUN poetry install --without dev --sync
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
||||
poetry install --without dev --sync
|
||||
|
||||
CMD poetry run python dj-embe
|
||||
|
Reference in New Issue
Block a user