5ca44ec
#!/bin/bash
5ca44ec
5ca44ec
source /run/docker-bash-env
5ca44ec
5ca44ec
# set storage first
5ca44ec
(
5ca44ec
    . /etc/sysconfig/docker-storage-setup
5ca44ec
    /usr/bin/docker-storage-setup
5ca44ec
)
5ca44ec
5ca44ec
getent group docker || groupadd docker
5ca44ec
5ca44ec
5ca44ec
# Inhibit sd-notify for docker-containerd, we want to get the notification
5ca44ec
# from the docker process
5ca44ec
NOTIFY_SOCKET=/dev/null /usr/libexec/docker/docker-containerd-current \
5ca44ec
    --listen unix:///run/containerd.sock      \
5ca44ec
    --shim /usr/bin/shim.sh &
5ca44ec
5ca44ec
while test \! -e /run/containerd.sock;
5ca44ec
do
5ca44ec
      sleep 0.1
5ca44ec
done
5ca44ec
5ca44ec
# Run all the installed containers
5ca44ec
mkdir -p /run/docker/plugins/
5ca44ec
ls -1 /usr/libexec/docker/*plugin |  \
5ca44ec
while read i;
5ca44ec
do
5ca44ec
    plugin=$(basename $i)
5ca44ec
    test -e /run/docker/plugins/$plugin.sock || mkfifo /run/docker/plugins/$plugin.sock
5ca44ec
    $i &
5ca44ec
done
5ca44ec
5ca44ec
exec /usr/bin/dockerd-current \
5ca44ec
     --config-file=/etc/docker/container-daemon.json \
5ca44ec
     $OPTIONS \
5ca44ec
     $DOCKER_STORAGE_OPTIONS \
5ca44ec
     $DOCKER_NETWORK_OPTIONS \
5ca44ec
     $ADD_REGISTRY \
5ca44ec
     $BLOCK_REGISTRY \
5ca44ec
     $INSECURE_REGISTRY