File tree 6 files changed +41
-3
lines changed
6 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 23
23
sudo apt-get install python3-pip -y --no-install-recommends
24
24
sudo pip3 install json-spec
25
25
json validate --schema-file=php/containers-schema.json --document-file=php/containers.json
26
+ JSON_FILES="$(find ./community-containers -name '*.json')"
27
+ mapfile -t JSON_FILES <<< "$JSON_FILES"
28
+ for file in "${JSON_FILES[@]}"; do
29
+ json validate --schema-file=php/containers-schema.json --document-file="$file" | tee -a ./json-validator.log
30
+ done
31
+ if grep "Exception: document does not validate with schema." ./json-validator.log; then
32
+ exit 1
33
+ fi
Original file line number Diff line number Diff line change
1
+ {
2
+ "aio_services_v1" : [
3
+ {
4
+ "container_name" : " nextcloud-aio-fail2ban" ,
5
+ "display_name" : " Fail2ban" ,
6
+ "image" : " szaimen/aio-fail2ban" ,
7
+ "image_tag" : " %AIO_CHANNEL%" ,
8
+ "internal_port" : " host" ,
9
+ "restart" : " unless-stopped" ,
10
+ "cap_add" : [
11
+ " NET_ADMIN" ,
12
+ " NET_RAW"
13
+ ],
14
+ "environment" : [
15
+ " TZ=%TIMEZONE%"
16
+ ],
17
+ "volumes" : [
18
+ {
19
+ "source" : " nextcloud_aio_nextcloud" ,
20
+ "destination" : " /nextcloud" ,
21
+ "writeable" : false
22
+ }
23
+ ]
24
+ }
25
+ ]
26
+ }
Original file line number Diff line number Diff line change
1
+ This is not working on Docker Desktop since it needs network_mode: host in order to work correctly.
Original file line number Diff line number Diff line change
1
+ ## This is a WIP and not working yet!
Original file line number Diff line number Diff line change 39
39
},
40
40
"display_name" : {
41
41
"type" : " string" ,
42
- "pattern" : " ^[A-Za-z ]+$"
42
+ "pattern" : " ^[A-Za-z 0-9 ]+$"
43
43
},
44
44
"environment" : {
45
45
"type" : " array" ,
51
51
},
52
52
"container_name" : {
53
53
"type" : " string" ,
54
- "pattern" : " ^nextcloud-aio-[a-z-]+$"
54
+ "pattern" : " ^nextcloud-aio-[a-z-0-9 ]+$"
55
55
},
56
56
"internal_port" : {
57
57
"type" : " string" ,
Original file line number Diff line number Diff line change @@ -477,7 +477,9 @@ public function CreateContainer(Container $container) : void {
477
477
}
478
478
479
479
// Disable arp spoofing
480
- $ requestBody ['HostConfig ' ]['CapDrop ' ] = ['NET_RAW ' ];
480
+ if (!in_array ('NET_RAW ' , $ capAdds , true )) {
481
+ $ requestBody ['HostConfig ' ]['CapDrop ' ] = ['NET_RAW ' ];
482
+ }
481
483
482
484
if ($ container ->isApparmorUnconfined ()) {
483
485
$ requestBody ['HostConfig ' ]['SecurityOpt ' ] = ["apparmor:unconfined " ];
You can’t perform that action at this time.
0 commit comments