Skip to content

Commit

Permalink
Docker: Using run-parts to run scripts before and after daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Nov 4, 2023
1 parent 6123f52 commit 291de7d
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .docker/aiida-core-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ RUN mkdir -p "${CONDA_DIR}/etc/conda/activate.d" && \
COPY --chown="${SYSTEM_UID}:${SYSTEM_GID}" s6-assets/config-quick-setup.yaml "/aiida/assets/config-quick-setup.yaml"
COPY s6-assets/s6-rc.d /etc/s6-overlay/s6-rc.d
COPY s6-assets/init /etc/init
RUN mkdir /etc/init/run-before-daemon-start && \
mkdir /etc/init/run-after-daemon-start

# Otherwise will stuck on oneshot services
# https://github.com/just-containers/s6-overlay/issues/467
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/command/execlineb -P

with-contenv

foreground { s6-echo "Calling /etc/init/run-after-daemon-start" }
run-parts --regex=".*" /etc/init/run-after-daemon-start/
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/command/execlineb -P

with-contenv

foreground { s6-echo "Calling /etc/init/run-before-daemon-start" }
run-parts --regex=".*" /etc/init/run-before-daemon-start/
Empty file.
Empty file.

0 comments on commit 291de7d

Please sign in to comment.