Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(autogpt_server): Fix vulnerability in Dockerfile (#8071)

Swifty0bf8edcd9625
diff --git a/rnd/autogpt_server/Dockerfile b/rnd/autogpt_server/Dockerfile
index a618479524..452b8f8274 100644
--- a/rnd/autogpt_server/Dockerfile
+++ b/rnd/autogpt_server/Dockerfile
@@ -17,6 +17,10 @@ ENV POETRY_VERSION=1.8.3 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$POETRY_HOME/bin:$PATH"
+
+# Upgrade pip and setuptools to fix security vulnerabilities
+RUN pip3 install --upgrade pip setuptools
+
RUN pip3 install poetry
# Copy and install dependencies
@@ -41,6 +45,10 @@ ENV POETRY_VERSION=1.8.3 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$POETRY_HOME/bin:$PATH"
+
+# Upgrade pip and setuptools to fix security vulnerabilities
+RUN pip3 install --upgrade pip setuptools
+
# Copy only necessary files from builder
COPY --from=builder /app /app
COPY --from=builder /usr/local/lib/python3.11 /usr/local/lib/python3.11
diff --git a/rnd/market/Dockerfile b/rnd/market/Dockerfile
index b6d7be6e02..e7bb52367b 100644
--- a/rnd/market/Dockerfile
+++ b/rnd/market/Dockerfile
@@ -17,6 +17,10 @@ ENV POETRY_VERSION=1.8.3 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$POETRY_HOME/bin:$PATH"
+
+# Upgrade pip and setuptools to fix security vulnerabilities
+RUN pip3 install --upgrade pip setuptools
+
RUN pip3 install poetry
# Copy and install dependencies
@@ -35,6 +39,9 @@ FROM python:3.11-slim-buster AS server_dependencies
WORKDIR /app
+# Upgrade pip and setuptools to fix security vulnerabilities
+RUN pip3 install --upgrade pip setuptools
+
# Copy only necessary files from builder
COPY --from=builder /app /app
COPY --from=builder /usr/local/lib/python3.11 /usr/local/lib/python3.11