From 409a2f93f4656f67a3bcf42ad3536eff615795d6 Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <jeff@scentech-medical.com>
Date: Sat, 28 Jan 2023 21:18:26 +0200
Subject: [PATCH] bumped base image to v2 to fix non-root user bug

---
 30-add-host-ip-entry.sh |  3 --
 Dockerfile              |  2 +-
 docker-entrypoint.sh    | 35 ----------------------
 docker-run.sh           | 65 -----------------------------------------
 4 files changed, 1 insertion(+), 104 deletions(-)
 delete mode 100755 30-add-host-ip-entry.sh
 delete mode 100755 docker-entrypoint.sh
 delete mode 100755 docker-run.sh

diff --git a/30-add-host-ip-entry.sh b/30-add-host-ip-entry.sh
deleted file mode 100755
index 50dc6f2..0000000
--- a/30-add-host-ip-entry.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }')
-echo "$HOST_IP host.docker.internal" >> /etc/hosts
diff --git a/Dockerfile b/Dockerfile
index 29a4ad4..c37cbb8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM modjular/alpine-edge:v1
+FROM modjular/alpine-edge:v2
 
 LABEL maintainer "Jeffrey Phillips Freeman <the@jeffreyfreeman.me>"
 
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
deleted file mode 100755
index a2b1a03..0000000
--- a/docker-entrypoint.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-set -e
-
-if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then
-    exec 3>&1
-else
-    exec 3>/dev/null
-fi
-
-if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then
-    echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration"
-
-    echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/"
-    find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do
-        case "$f" in
-            *.sh)
-                if [ -x "$f" ]; then
-                    echo >&3 "$0: Launching $f";
-                    "$f"
-                else
-                    # warn on shell scripts without exec bit
-                    echo >&3 "$0: Ignoring $f, not executable";
-                fi
-                ;;
-            *) echo >&3 "$0: Ignoring $f";;
-        esac
-    done
-
-    echo >&3 "$0: Configuration complete; ready for start up"
-else
-    echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration"
-fi
-
-exec "$@"
diff --git a/docker-run.sh b/docker-run.sh
deleted file mode 100755
index b915ee9..0000000
--- a/docker-run.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-# SIGTERM-handler
-term_handler() {
-  for PID in "${PIDS[@]}"
-  do
-    [[ -n "$PID" ]] && kill "$PID"
-  done
-
-  exit 0
-}
-
-trap 'term_handler' INT QUIT TERM
-
-set -e
-
-# Run all the scripts in the docker-run.d directory. If a script stopping should stop the container then
-# the script should export its PID in the PID variable, otherwise it should not export the variable.
-PIDS=()
-if /usr/bin/find "/docker-run.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then
-  echo >&3 "$0: /docker-run.d/ is not empty, will attempt to bring up services"
-
-  echo >&3 "$0: Looking for shell scripts in /docker-run.d/"
-  for f in $(ls /docker-run.d/* | sort -n)
-  do
-    case "$f" in
-      *.sh)
-        if [ -x "$f" ]; then
-          echo >&3 "$0: Launching $f";
-          unset PID
-          source $f
-          PIDS+=( "${PID}" )
-        else
-          # warn on shell scripts without exec bit
-          echo >&3 "$0: Ignoring $f, not executable";
-        fi
-        ;;
-      *) echo >&3 "$0: Ignoring $f";;
-    esac
-  done
-
-
-  echo >&3 "$0: Start up complete, all services are now running."
-else
-  echo >&3 "$0: No files found in /docker-run.d/, nothing to do, will run forever!"
-  while :
-  do
-    sleep 1
-  done
-fi
-
-# Run indefinately until one of the running processes stops
-ALL_RUNNING="true"
-while [[ "$ALL_RUNNING" == "true" ]]; do
-  sleep 1
-  for PID in "${PIDS[@]}"
-  do
-    if [[ ! -e /proc/$PID ]]; then
-      ALL_RUNNING="false"
-      echo "One of the processes shutdown: ${PID}"
-    fi
-  done
-done
-
-# Stop container properly
-term_handler
-- 
GitLab