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.binSh
|
||||||
dockerTools.caCertificates
|
dockerTools.caCertificates
|
||||||
bashInteractive
|
bashInteractive
|
||||||
ncurses
|
busybox
|
||||||
coreutils
|
|
||||||
util-linux
|
|
||||||
gnugrep
|
|
||||||
gawk
|
|
||||||
findutils
|
|
||||||
which
|
|
||||||
vim
|
|
||||||
iputils
|
|
||||||
iproute2
|
|
||||||
curl
|
|
||||||
];
|
];
|
||||||
pathsToLink = [
|
pathsToLink = [
|
||||||
"/bin"
|
"/bin"
|
||||||
|
@@ -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 = [
|
||||||
|
@@ -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 $?
|
||||||
|
Reference in New Issue
Block a user