Skip to content

Commit 448da43

Browse files
committed
Refresh Dockerfile
1 parent 501cb3d commit 448da43

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

Dockerfile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
FROM python:3.11-slim-bullseye as build
2-
WORKDIR /wheels
1+
# Release instructions:
2+
# 1. Update the version tag in the Dockerfile to match the version in sherlock/__init__.py
3+
# 2. Update the VCS_REF tag to match the tagged version's FULL commit hash
4+
# 3. Build image with BOTH latest and version tags
5+
# i.e. `docker build -t sherlock/sherlock:0.15.0 -t sherlock/sherlock:latest .`
6+
7+
FROM python:3.12-slim-bullseye as build
8+
WORKDIR /sherlock
39

4-
COPY requirements.txt /opt/sherlock/
510
RUN apt-get update \
6-
&& apt-get install -y build-essential \
7-
&& pip3 wheel -r /opt/sherlock/requirements.txt
11+
pip3 install --no-cache-dir --upgrade pip
812

9-
FROM python:3.11-slim-bullseye
10-
WORKDIR /opt/sherlock
13+
FROM python:3.12-slim-bullseye
14+
WORKDIR /sherlock
1115

12-
ARG VCS_REF
16+
ARG VCS_REF= # CHANGE ME ON UPDATE
1317
ARG VCS_URL="https://github.com/sherlock-project/sherlock"
18+
ARG VERSION_TAG= # CHANGE ME ON UPDATE
1419

1520
LABEL org.label-schema.vcs-ref=$VCS_REF \
16-
org.label-schema.vcs-url=$VCS_URL
17-
18-
COPY --from=build /wheels /wheels
19-
COPY . /opt/sherlock/
21+
org.label-schema.vcs-url=$VCS_URL \
22+
org.label-schema.name="Sherlock" \
23+
org.label-schema.version=$VERSION_TAG \
24+
website="https://sherlockproject.xyz"
2025

21-
RUN pip3 install --no-cache-dir . -f /wheels \
22-
&& rm -rf /wheels
26+
RUN pip3 install --no-cache-dir sherlock-project==$VERSION_TAG
2327

2428
WORKDIR /opt/sherlock/sherlock
2529

0 commit comments

Comments
 (0)