From 54ad329227d9716575fb58934300be9bfabd9d68 Mon Sep 17 00:00:00 2001 From: Ankit Majumder <50029432+ankit1w@users.noreply.github.com> Date: Sat, 4 Apr 2026 10:00:52 +0530 Subject: [PATCH] ensure pip is actually upgraded during Docker build Previously, pip was upgraded in an isolated AS build stage that was never copied into the final image, meaning the upgrade was completely discarded. This commit removes the unused multi-stage block and moves the pip upgrade into the final stage. This ensures the container actually uses the latest version of pip when installing the project dependencies, while also cleaning up dead code. --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ccdfbf2303..b89a431521 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,6 @@ # 3. Build image with BOTH latest and version tags # i.e. `docker build -t sherlock/sherlock:0.16.0 -t sherlock/sherlock:latest .` -FROM python:3.12-slim-bullseye AS build -WORKDIR /sherlock - -RUN pip3 install --no-cache-dir --upgrade pip - FROM python:3.12-slim-bullseye WORKDIR /sherlock @@ -24,7 +19,8 @@ LABEL org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.version=$VERSION_TAG \ website="https://sherlockproject.xyz" -RUN pip3 install --no-cache-dir sherlock-project==$VERSION_TAG +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir sherlock-project==$VERSION_TAG WORKDIR /sherlock