File tree Expand file tree Collapse file tree 6 files changed +17
-0
lines changed Expand file tree Collapse file tree 6 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ include:
16
16
- names:
17
17
- {{ d.pkg.docker.config_file }}
18
18
- {{ d.pkg.docker.environ_file }}
19
+ - {{ d.pkg.docker.daemon_config_file }}
19
20
- require:
20
21
- sls: {{ sls_archive_clean if d.pkg.docker.use_upstream == ' archive' else sls_package_clean }}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ docker:
17
17
# yamllint enable-line rule:line-length
18
18
- DOCKER_OPTS="-s btrfs --dns 8.8.8.8"
19
19
- export http_proxy="http://172.17.42.1:3128"
20
+ daemon_config : {}
20
21
21
22
networks :
22
23
- nginxnet
Original file line number Diff line number Diff line change 11
11
its ( 'content' ) { should include 'DOCKER_OPTS="-s btrfs --dns 8.8.8.8"' }
12
12
its ( 'content' ) { should include 'export http_proxy="http://172.17.42.1:3128"' }
13
13
end
14
+ describe file ( '/etc/docker/daemon.json' ) do
15
+ it { should_not exist }
16
+ end
14
17
end
Original file line number Diff line number Diff line change 6
6
describe file ( '/etc/default/docker' ) do
7
7
it { should_not exist }
8
8
end
9
+ describe file ( '/etc/docker/daemon.json' ) do
10
+ it { should_not exist }
11
+ end
9
12
end
Original file line number Diff line number Diff line change 11
11
its ( 'content' ) { should include 'DOCKER_OPTS="-s btrfs --dns 8.8.8.8"' }
12
12
its ( 'content' ) { should include 'export http_proxy="http://172.17.42.1:3128"' }
13
13
end
14
+ describe file ( '/etc/docker/daemon.json' ) do
15
+ it { should be_file }
16
+ its ( 'owner' ) { should eq 'root' }
17
+ its ( 'group' ) { should eq 'root' }
18
+ its ( 'mode' ) { should cmp '0640' }
19
+ its ( 'content' ) { should include '"insecure-registries": []' }
20
+ end
14
21
end
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ docker:
17
17
# yamllint disable-line rule:line-length
18
18
- DOCKER_OPTS="-s btrfs --dns 8.8.8.8"
19
19
- export http_proxy="http://172.17.42.1:3128"
20
+ daemon_config :
21
+ insecure-registries : []
20
22
21
23
containers :
22
24
running :
You can’t perform that action at this time.
0 commit comments