Minify base docker image

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-06-16 11:56:53 +01:00
parent f68fdf9211
commit 06a644bc35
3 changed files with 17 additions and 17 deletions

View File

@@ -9,17 +9,7 @@ pkgs.dockerTools.buildImage {
dockerTools.binSh
dockerTools.caCertificates
bashInteractive
ncurses
coreutils
util-linux
gnugrep
gawk
findutils
which
vim
iputils
iproute2
curl
busybox
];
pathsToLink = [
"/bin"

View File

@@ -134,8 +134,6 @@ pkgs.dockerTools.buildImage {
name = "nextcloud";
fromImage = import ../base { inherit pkgs; };
diskSize = 2048;
copyToRoot = pkgs.buildEnv {
name = "root";
paths = [

View File

@@ -65,8 +65,20 @@ cron
PHPRC="$(dirname "$(readlink -f "$(which php)")")/../lib/php.ini"
export PHPRC
setsid --wait httpd "$@" &
pid=$!
trap 'kill -INT $pid' INT
wait $pid
pidfile=$(mktemp)
# shellcheck disable=SC2016
setsid sh -c '
echo "$$" > "$1"
shift
exec httpd "$@"
' _ "$pidfile" "$@" &
until [ -s "$pidfile" ]; do sleep 0.01; done
pid=$(cat "$pidfile")
rm "$pidfile"
trap 'kill -INT "$pid"' INT
wait "$pid"
exit $?