Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 97fdac7

Browse files
Add defaults to Fedora CoreOS provider
Add the defaults used by the Docker installation on Fedora CoreOS provider available in /etc/systemd/system/docker.service and /etc/sysconfig/docker except for --live-restore which is incompatible with swarm mode.
1 parent ca131ee commit 97fdac7

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

.DS_Store

8 KB
Binary file not shown.

libmachine/provision/fedora_coreos.go

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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 options are:
64+
// --live-restore option which is incompatible with swarm mode
65+
// --userland-proxy-path which disables networking to function as expected
6166
engineConfigTmpl := `[Service]
6267
Environment=TMPDIR=/var/tmp
6368
ExecStart=
6469
ExecStart=/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
70+
--selinux-enabled \
71+
--log-driver=journald \
72+
--default-ulimit nofile=1024:1024 \
73+
--init-path /usr/libexec/docker/docker-init \
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
7685
Environment={{range .EngineOptions.Env}}{{ printf "%q" . }} {{end}}
7786
`
7887

0 commit comments

Comments
 (0)