Skip to content

Commit

Permalink
add no root and remove poetry once done with it/
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Jan 5, 2024
1 parent 0471493 commit 794a017
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ RUN python -m pip install --no-cache-dir poetry

COPY poetry.lock pyproject.toml /app/
RUN python -m poetry config virtualenvs.in-project true && \
python -m poetry install --only main,deploy && \
python -m poetry install --no-root --only main,deploy && \
/app/.venv/bin/python3 -m pip install --no-cache-dir psycopg2
USER root
RUN apt-get purge -y build-essential python3-dev libpq-dev libffi-dev libssl-dev && \

RUN python -m pip uninstall poetry && \
apt-get purge -y build-essential python3-dev libpq-dev libffi-dev libssl-dev && \
rm -rf /var/lib/apt/lists/*
RUN rm -rf /var/cache/*
USER app
Expand Down

0 comments on commit 794a017

Please sign in to comment.