Minify base docker image
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -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"
|
||||
|
@@ -134,8 +134,6 @@ pkgs.dockerTools.buildImage {
|
||||
name = "nextcloud";
|
||||
fromImage = import ../base { inherit pkgs; };
|
||||
|
||||
diskSize = 2048;
|
||||
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "root";
|
||||
paths = [
|
||||
|
@@ -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 $?
|
||||
|
Reference in New Issue
Block a user