File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN yum -y install python3
12
12
# Install the python requirements of container accounting
13
13
RUN pip3 install -r ./requirements.txt
14
14
15
- # Set PYTHONPATH so Python can import the necessary files at run time.
15
+ # Set PYTHONPATH so Python can import the necessary files at run time.
16
16
ENV PYTHONPATH=/usr/share/container_accounting
17
17
18
18
# To avoid running the container as root, create an apel user.
@@ -22,4 +22,10 @@ RUN chown -R apel:apel /usr/share/container_accounting
22
22
# Set the default user of the container to apel.
23
23
USER apel:apel
24
24
25
- ENTRYPOINT ./entrypoint.sh
25
+ # Set a healthcheck for this container, and give the container 30 seconds
26
+ # after start up where the health of the container will not be checked.
27
+ # This makes it likely the underlying python call will have returned at least
28
+ # once before the health check is called.
29
+ HEALTHCHECK --start-period=30s CMD ./healthcheck.sh
30
+
31
+ ENTRYPOINT ./entrypoint.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # A simple scrip to pass the stored return code of the python process back to
4
+ # the caller for the purposes of a container health check.
5
+
6
+ exit ` cat status.txt`
7
+
You can’t perform that action at this time.
0 commit comments