Skip to content

Commit

Permalink
fix: adding 14 tested images
Browse files Browse the repository at this point in the history
  • Loading branch information
pacostas authored and github-actions[bot] committed Sep 25, 2024
1 parent 0a17d46 commit 0ba38b5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions 14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ RUN yum install -y centos-release-scl-rh && \

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
RUN chmod +x $STI_SCRIPTS_PATH/init-wrapper

# Copy extra files to the image, including help file.
COPY ./root/ /
Expand Down
1 change: 1 addition & 0 deletions 14/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN yum -y module enable nodejs:$NODEJS_VERSION && \

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
RUN chmod +x $STI_SCRIPTS_PATH/init-wrapper

# Copy extra files to the image, including help file.
COPY ./root/ /
Expand Down
1 change: 1 addition & 0 deletions 14/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ RUN yum install -y yum-utils && \

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
RUN chmod +x $STI_SCRIPTS_PATH/init-wrapper

# Copy extra files to the image.
COPY ./root/ /
Expand Down
1 change: 1 addition & 0 deletions 14/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ RUN yum -y module enable nodejs:$NODEJS_VERSION && \

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
RUN chmod +x $STI_SCRIPTS_PATH/init-wrapper

# Copy extra files to the image.
COPY ./root/ /
Expand Down
18 changes: 18 additions & 0 deletions 14/s2i/bin/init-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Overview of how this script works: http://veithen.io/2014/11/16/sigterm-propagation.html
# Set a trap to kill the main app process when this
# init script receives SIGTERM or SIGINT
trap 'kill -s TERM $PID' TERM INT
# Execute the main application in the background
"$@" &
PID=$!
# wait command always terminates when trap is caught, even if the process hasn't finished yet
wait $PID
# Remove the trap and wait till the app process finishes completely
trap - TERM INT
# We wait again, since the first wait terminates when trap is caught
wait $PID
# Exit with the exit code of the app process
STATUS=$?
exit $STATUS
3 changes: 3 additions & 0 deletions 14/s2i/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ run_node() {
if [ "$DEV_MODE" == true ]; then
echo "Launching via nodemon..."
exec nodemon --inspect="$DEBUG_PORT"
elif [ -v NODE_CMD ]; then
echo "launching via init wrapper..."
exec ${STI_SCRIPTS_PATH}/init-wrapper $NODE_CMD
else
echo "Launching via npm..."
exec npm run -d $NPM_RUN
Expand Down

0 comments on commit 0ba38b5

Please sign in to comment.