From 3c289abfca3e9ab9552cf8fb5aebcc00e5b9592a Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 23 Dec 2022 19:07:03 -0500 Subject: [PATCH] we cannot poetry install without gcc --- Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index f02b300..41694c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,17 @@ RUN set -xe \ && apt-get install -y -q \ libpq-dev +WORKDIR /app +ADD pyproject.toml poetry.lock /app/ +ADD connectors /app/connectors +RUN poetry install + +COPY . /app/ + +# run poetry install again AFTER copying the app into the image +# otherwise it does not know what the main app module is +RUN poetry install + # remove packages that are not needed in production. # just for security. won't help image size. RUN set -xe \ @@ -21,15 +32,4 @@ RUN set -xe \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* -WORKDIR /app -ADD pyproject.toml poetry.lock /app/ -ADD connectors /app/connectors -RUN poetry install - -COPY . /app/ - -# run poetry install again AFTER copying the app into the image -# otherwise it does not know what the main app module is -RUN poetry install - CMD ./bin/boot_server_in_docker