We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb23099 commit 45d0a3dCopy full SHA for 45d0a3d
Dockerfile
@@ -1,9 +1,9 @@
1
FROM ghcr.io/ministryofjustice/analytical-platform-airflow-python-base:1.6.0
2
3
COPY requirements.txt requirements.txt
4
-COPY src/main.py main.py
+COPY src/ .
5
RUN <<EOF
6
pip install --no-cache-dir --requirement requirements.txt
7
EOF
8
9
-ENTRYPOINT ["python3", "main.py"]
+ENTRYPOINT ["bash", "entrypoint.sh"]
src/entrypoint.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+MODE="${MODE:-basic}"
+case "${MODE}" in
+ basic)
+ echo "Running in basic mode"
+ env
+ aws sts get-caller-identity
10
+ ;;
11
+ benchmark)
12
+ echo "Running in benchmark mode"
13
14
15
+ python3 main.py
16
17
+ *)
18
+ echo "Unknown mode: ${MODE}"
19
+ exit 1
20
21
+esac
0 commit comments