@@ -58,21 +58,30 @@ func (provisioner *FedoraCoreOSProvisioner) GenerateDockerOptions(dockerPort int
5858 driverNameLabel := fmt .Sprintf ("provider=%s" , provisioner .Driver .DriverName ())
5959 provisioner .EngineOptions .Labels = append (provisioner .EngineOptions .Labels , driverNameLabel )
6060
61+ // Adds defaults used by Fedora CoreOS in /etc/systemd/system/docker.service
62+ // as well as in /etc/sysconfig/docker.
63+ // The only removed option is the --live-restore option which is incompatible
64+ // with swarm mode.
6165 engineConfigTmpl := `[Service]
6266Environment=TMPDIR=/var/tmp
6367ExecStart=
6468ExecStart=/usr/bin/dockerd \
65- --exec-opt native.cgroupdriver=systemd \
66- --host=unix:///var/run/docker.sock \
67- --host=tcp://0.0.0.0:{{.DockerPort}} \
68- --tlsverify \
69- --tlscacert {{.AuthOptions.CaCertRemotePath}} \
70- --tlscert {{.AuthOptions.ServerCertRemotePath}} \
71- --tlskey {{.AuthOptions.ServerKeyRemotePath}}{{ range .EngineOptions.Labels }} \
72- --label {{.}}{{ end }}{{ range .EngineOptions.InsecureRegistry }} \
73- --insecure-registry {{.}}{{ end }}{{ range .EngineOptions.RegistryMirror }} \
74- --registry-mirror {{.}}{{ end }}{{ range .EngineOptions.ArbitraryFlags }} \
75- --{{.}}{{ end }} \$DOCKER_OPTS \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPT_IPMASQ
69+ --selinux-enabled \
70+ --log-driver=journald \
71+ --default-ulimit nofile=1024:1024 \
72+ --init-path /usr/libexec/docker/docker-init \
73+ --userland-proxy-path /usr/libexec/docker/docker-proxy \
74+ --exec-opt native.cgroupdriver=systemd \
75+ --host=unix:///var/run/docker.sock \
76+ --host=tcp://0.0.0.0:{{.DockerPort}} \
77+ --tlsverify \
78+ --tlscacert {{.AuthOptions.CaCertRemotePath}} \
79+ --tlscert {{.AuthOptions.ServerCertRemotePath}} \
80+ --tlskey {{.AuthOptions.ServerKeyRemotePath}}{{ range .EngineOptions.Labels }} \
81+ --label {{.}}{{ end }}{{ range .EngineOptions.InsecureRegistry }} \
82+ --insecure-registry {{.}}{{ end }}{{ range .EngineOptions.RegistryMirror }} \
83+ --registry-mirror {{.}}{{ end }}{{ range .EngineOptions.ArbitraryFlags }} \
84+ --{{.}}{{ end }} \$DOCKER_OPTS \$DOCKER_OPT_BIP \$DOCKER_OPT_MTU \$DOCKER_OPT_IPMASQ
7685Environment={{range .EngineOptions.Env}}{{ printf "%q" . }} {{end}}
7786`
7887
0 commit comments