Skip to content

Commit 26e512e

Browse files
committed
fix: make entrypoint.sh work as expected
1 parent 4399873 commit 26e512e

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ RUN python -m pip install --no-cache-dir -r requirements.txt
2020
# Copy the rest of the application code
2121
COPY --chown=app:app . .
2222

23-
CMD ["sh", "enrypoint.sh"]
23+
ENTRYPOINT ["/app/entrypoint.sh"]
24+
CMD ["run"]

entrypoint.sh

100644100755
Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1-
# Build and publish the tracking lists for safebrowsing and webkit
2-
python lists2safebrowsing.py
3-
python lists2webkit.py
1+
#!/usr/bin/env bash
2+
3+
_usage() {
4+
cat <<EOF
5+
usage: ${0} [run]
6+
7+
arguments:
8+
run main entrypoint, execute shavar list creation scripts and exit
9+
10+
EOF
11+
}
12+
13+
if [[ "${#}" -gt 0 ]]; then
14+
CMD=${1} && shift
15+
16+
case "${CMD}" in
17+
run)
18+
python lists2safebrowsing.py
19+
python lists2webkit.py
20+
;;
21+
22+
*)
23+
echo "ERROR: unknown command: \"${CMD}\""
24+
_usage && exit 1
25+
;;
26+
esac
27+
28+
else
29+
_usage && exit
30+
fi

0 commit comments

Comments
 (0)