-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker.tf
60 lines (49 loc) · 1.11 KB
/
docker.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
data "linuxkit_image" "docker" {
name = "dockerd"
image = "docker:${var.docker_version}"
command = ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
capabilities = ["all"]
net = "host"
pid = "host"
mounts {
type = "cgroup"
options = ["rw", "nosuid", "noexec", "nodev", "relatime"]
}
devices {
path = "/dev/console"
type = "c"
major = 5
minor = 1
filemode = "0666"
}
devices {
path = "all"
type = "b"
}
binds = [
"/dev:/dev",
"/etc/docker/daemon.json:/etc/docker/daemon.json",
"/etc/resolv.cluster:/etc/resolv.conf",
"/lib/modules:/lib/modules",
"/run:/run:rshared",
"/var/run:/var/run:rshared",
"/var/persist:/var/persist:rshared",
]
rootfs_propagation = "shared"
runtime {
mkdir = [
"/var/persist/docker",
]
}
}
data "linuxkit_file" "docker_config" {
path = "etc/docker/daemon.json"
contents = jsonencode({
dns = ["172.26.64.1"]
data-root = "/var/persist/docker"
iptables = false
bridge = "none"
})
mode = "0644"
optional = false
}