Skip to content

Commit 5273134

Browse files
committed
Download hash list during runtime instead of baking it into the docker image
1 parent 3ea9931 commit 5273134

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ WORKDIR /app
1515

1616
COPY . /app
1717

18-
RUN curl -L https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z -o latest-hashes.7z && \
19-
7z x latest-hashes.7z -y && \
20-
rm -rf latest-hashes.7z
21-
2218
RUN g++ hashsearch.cpp -lfcgi++ -lfcgi -O2 -o hashsearch
2319

20+
COPY entrypoint.sh /app/entrypoint.sh
21+
2422
EXPOSE 8000
2523

26-
CMD ["spawn-fcgi", "-p", "8000", "./hashsearch", "-n"]
24+
CMD ["./entrypoint.sh"]

entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Downloading latest hash list..."
5+
curl -L https://github.com/glacier-modding/Hitman-Hashes/releases/latest/download/latest-hashes.7z -o latest-hashes.7z
6+
7z x latest-hashes.7z -y
7+
rm latest-hashes.7z
8+
9+
echo "Starting HashSearch..."
10+
exec spawn-fcgi -p 8000 ./hashsearch -n

0 commit comments

Comments
 (0)