mirror of
https://github.com/pinry/pinry.git
synced 2026-05-07 06:25:45 +02:00
feature: try to add poetry build
This commit is contained in:
@@ -24,10 +24,17 @@ RUN yarn build
|
||||
FROM python:3.9.12-slim-buster as base
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
WORKDIR pinry
|
||||
RUN apt-get update \
|
||||
&& if [ $(dpkg --print-architecture) = "arm64" -o $(dpkg --print-architecture) = "armhf" ]; then apt-get -y install apt-utils; fi \
|
||||
&& apt-get -y install gcc default-libmysqlclient-dev
|
||||
RUN pip --no-cache-dir install --user mysqlclient cx-Oracle
|
||||
# Install Poetry requirements
|
||||
COPY pyproject.toml ./
|
||||
COPY poetry.lock ./
|
||||
RUN pip install poetry \
|
||||
&& poetry run pip install mysqlclient cx-Oracle \
|
||||
&& poetry run pip install "rcssmin==1.0.6" --install-option="--without-c-extensions" \
|
||||
&& poetry install
|
||||
|
||||
|
||||
# Final image
|
||||
@@ -55,17 +62,11 @@ RUN apt-get update \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get autoclean
|
||||
|
||||
# Install Poetry requirements
|
||||
COPY pyproject.toml ./
|
||||
COPY poetry.lock ./
|
||||
RUN pip install "rcssmin==1.0.6" --install-option="--without-c-extensions" \
|
||||
&& pip install poetry \
|
||||
&& poetry install
|
||||
RUN pip install --no-cache-dir poetry
|
||||
|
||||
# Copy from previous stages
|
||||
COPY --from=yarn-build pinry-spa/dist /pinry/pinry-spa/dist
|
||||
COPY --from=base /root/.local /root/.local
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
COPY --from=base /root/.cache/pypoetry /root/.cache/pypoetry
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user