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.binSh
dockerTools.caCertificates dockerTools.caCertificates
bashInteractive bashInteractive
ncurses busybox
coreutils
util-linux
gnugrep
gawk
findutils
which
vim
iputils
iproute2
curl
]; ];
pathsToLink = [ pathsToLink = [
"/bin" "/bin"

View File

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

View File

@@ -65,8 +65,20 @@ cron
PHPRC="$(dirname "$(readlink -f "$(which php)")")/../lib/php.ini" PHPRC="$(dirname "$(readlink -f "$(which php)")")/../lib/php.ini"
export PHPRC export PHPRC
setsid --wait httpd "$@" & pidfile=$(mktemp)
pid=$!
trap 'kill -INT $pid' INT # shellcheck disable=SC2016
wait $pid 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 $? exit $?