refactor: run upgrade in dockerfiles to update dependencies (#5508)

chore: Update Dockerfiles to use COPY instead of ADD run apt-get upgrade

- Replaced ADD commands with COPY for better clarity and consistency across Dockerfiles.
- Added apt-get upgrade and clean commands to reduce image size and ensure packages are up to date.
- Updated user creation commands to include necessary cleanup steps.
- Ensured all Dockerfiles follow a similar structure for maintainability.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-01-02 12:49:41 -03:00 • committed by GitHub
commit 8ea4405010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 21 deletions

View file

@ -3,7 +3,11 @@ FROM --platform=linux/amd64 python:3.10-slim
WORKDIR /app
# Install Poetry
RUN apt-get update && apt-get install gcc g++ curl build-essential postgresql-server-dev-all -y
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install gcc g++ curl build-essential postgresql-server-dev-all -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://install.python-poetry.org | python3 -
# # Add Poetry to PATH
ENV PATH="${PATH}:/root/.local/bin"