# Release instructions:
# 1. Update the version tag in the Dockerfile to match the version in sherlock/__init__.py
# 2. Update the VCS_REF tag to match the tagged version's FULL commit hash
# 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-bookworm AS build
WORKDIR /sherlock
RUN pip3 install --no-cache-dir --upgrade pip
FROM python:3.12-bookworm
WORKDIR /sherlock
ARG VCS_REF
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
ARG VERSION_TAG
ENV SHERLOCK_ENV=docker
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.name="Sherlock" \
org.label-schema.version=$VERSION_TAG \
website="https://sherlockproject.xyz"
RUN pip3 install --no-cache-dir sherlock-project==$VERSION_TAG
WORKDIR /sherlock
ENTRYPOINT ["sherlock"]
# Ignore git and node stuff .git node_modules *.log __pycache__ *.pyc *.pyo *.pyd venv .env .env.* *.egg-info build dist coverage .tox *.tox *.venv *.cache *.pytest_cache
Concerns: This Dockerfile does not build Sherlock from source; it installs sherlock-project==$VERSION_TAG from PyPI instead of compiling from repository, The final stage requires build-args VERSION_TAG and VCS_REF without defaults; build may fail if not supplied, No COPY steps; the build stage does not contribute artifacts; overall packaging may be misleading if the intention is to build from source
Concerns: Does not build Sherlock from source; it installs sherlock-project from PyPI instead of compiling from the repository., The build stage is unused and there are no COPY steps; VERSION_TAG is required via ARG but has no default and there is no source checkout to build from., Release instructions mention syncing version with sherlock/__init__.py, but the Dockerfile relies on a VERSION_TAG argument and does not ensure consistency with source code.
# Release instructions:
# 1. Update the version tag in the Dockerfile to match the version in sherlock/__init__.py
# 2. Update the VCS_REF tag to match the tagged version's FULL commit hash
# 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-bookworm
WORKDIR /sherlock
ARG VCS_REF
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
ARG VERSION_TAG
ENV SHERLOCK_ENV=docker
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.name="Sherlock" \
org.label-schema.version=$VERSION_TAG \
website="https://sherlockproject.xyz"
RUN python -m pip install --no-cache-dir --upgrade pip
COPY . /sherlock
RUN python -m pip install --no-cache-dir .
ENTRYPOINT ["sherlock"]
Smoke [PASS]: sherlock --version Smoke [PASS]: sherlock --help Smoke [PASS]: command -v sherlock