forked from Github/frigate
Reduce amount layers of the docker image (#4448)
* Reduce amount layers of the docker image * Fix models file name
This commit is contained in:
10
docker/rootfs/etc/services.d/go2rtc/finish
Normal file → Executable file
10
docker/rootfs/etc/services.d/go2rtc/finish
Normal file → Executable file
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/execlineb -S1
|
||||
if { s6-test ${1} -ne 0 }
|
||||
if { s6-test ${1} -ne 256 }
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
# Take down the S6 supervision tree when the process fails
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
if [[ "${1}" -ne 0 && "${1}" -ne 256 ]]; then
|
||||
exec s6-svscanctl -t /var/run/s6/services
|
||||
fi
|
||||
|
||||
7
docker/rootfs/etc/services.d/go2rtc/run
Normal file → Executable file
7
docker/rootfs/etc/services.d/go2rtc/run
Normal file → Executable file
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425?permalink_comment_id=3945021
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -f "/config/frigate-go2rtc.yaml" ]]; then
|
||||
CONFIG_PATH=/config/frigate-go2rtc.yaml
|
||||
config_path="/config/frigate-go2rtc.yaml"
|
||||
else
|
||||
CONFIG_PATH=/usr/local/go2rtc/sbin/go2rtc.yaml
|
||||
config_path="/usr/local/go2rtc/go2rtc.yaml"
|
||||
fi
|
||||
|
||||
exec /usr/local/go2rtc/sbin/go2rtc -config="$CONFIG_PATH"
|
||||
exec go2rtc -config="${config_path}"
|
||||
|
||||
10
docker/rootfs/etc/services.d/nginx/finish
Normal file → Executable file
10
docker/rootfs/etc/services.d/nginx/finish
Normal file → Executable file
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/execlineb -S1
|
||||
if { s6-test ${1} -ne 0 }
|
||||
if { s6-test ${1} -ne 256 }
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
# Take down the S6 supervision tree when the process fails
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
if [[ "${1}" -ne 0 && "${1}" -ne 256 ]]; then
|
||||
exec s6-svscanctl -t /var/run/s6/services
|
||||
fi
|
||||
|
||||
6
docker/rootfs/etc/services.d/nginx/run
Normal file → Executable file
6
docker/rootfs/etc/services.d/nginx/run
Normal file → Executable file
@@ -1,2 +1,4 @@
|
||||
#!/usr/bin/execlineb -P
|
||||
/usr/local/nginx/sbin/nginx
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
exec nginx
|
||||
|
||||
Reference in New Issue
Block a user