mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-24 19:28:09 +00:00
more uses of moobyconfig in docker config
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
888ef34ffc
commit
5847bb7eb1
@ -38,14 +38,14 @@ start()
|
||||
# future change this to use a hypervisor socket.
|
||||
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
||||
|
||||
if cat /proc/cmdline | grep -q 'com.docker.database'
|
||||
if mobyconfig exists etc/docker/daemon.json
|
||||
then
|
||||
DOCKER_OPTS="${DOCKER_OPTS} --config-file $(mobyconfig path etc/docker/daemon.json)"
|
||||
fi
|
||||
if mobyconfig exists network
|
||||
then
|
||||
DATABASE="$(cat /proc/cmdline | sed -e 's/.*com.docker.database="//' -e 's/".*//')"
|
||||
MASTER_RO="/Database/branch/master/ro"
|
||||
CONFIG_FILE="${MASTER_RO}/${DATABASE}/etc/docker/daemon.json"
|
||||
[ -s ${CONFIG_FILE} ] && DOCKER_OPTS="${DOCKER_OPTS} --config-file ${CONFIG_FILE}"
|
||||
NETWORK_MODE="$(mobyconfig get network | tr -d '[[:space:]]')"
|
||||
NATIVE_PORT_FORWARDING="$(mobyconfig native/port-forwarding | tr -d '[[:space:]]')"
|
||||
NATIVE_PORT_FORWARDING="$(mobyconfig get native/port-forwarding | tr -d '[[:space:]]')"
|
||||
if [ "${NETWORK_MODE}" = "slirp" -o "${NATIVE_PORT_FORWARDING}" = "true" ]; then
|
||||
DOCKER_OPTS="${DOCKER_OPTS} --userland-proxy-bin /sbin/proxy"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user