github.com/mgoltzsche/ctnr@v0.7.1-alpha/model/compose/full-example.json (about) 1 { 2 "services": { 3 "foo": { 4 "image": "docker://redis", 5 "build": { 6 "context": "./dir", 7 "dockerfile": "Dockerfile", 8 "args": { 9 "foo": "bar" 10 } 11 }, 12 "entrypoint": [ 13 "/code/entrypoint.sh", 14 "-p", 15 "3000" 16 ], 17 "command": [ 18 "bundle", 19 "exec", 20 "thin", 21 "-p", 22 "3000" 23 ], 24 "working_dir": "/code", 25 "environment": { 26 "BAR": "bar_from_env_file_2", 27 "BAZ": "baz_from_service_def", 28 "FOO": "foo_from_env_file", 29 "QUX": "" 30 }, 31 "user": { 32 "uid": "someone", 33 "gid": "someone" 34 }, 35 "cap_add": [ 36 "ALL" 37 ], 38 "cap_drop": [ 39 "NET_ADMIN", 40 "SYS_ADMIN" 41 ], 42 "hostname": "my-web-container", 43 "domainname": "foo.com", 44 "dns": [ 45 "8.8.8.8", 46 "9.9.9.9" 47 ], 48 "dns_search": [ 49 "dc1.example.com", 50 "dc2.example.com" 51 ], 52 "extra_hosts": [ 53 { 54 "name": "somehost", 55 "ip": "162.242.195.82" 56 }, 57 { 58 "name": "otherhost", 59 "ip": "50.31.209.229" 60 } 61 ], 62 "ports": [ 63 { 64 "target": 3000, 65 "protocol": "tcp" 66 }, 67 { 68 "target": 3001, 69 "protocol": "tcp" 70 }, 71 { 72 "target": 3002, 73 "protocol": "tcp" 74 }, 75 { 76 "target": 3003, 77 "protocol": "tcp" 78 }, 79 { 80 "target": 3004, 81 "protocol": "tcp" 82 }, 83 { 84 "target": 3005, 85 "protocol": "tcp" 86 }, 87 { 88 "target": 8000, 89 "published": 8000, 90 "protocol": "tcp" 91 }, 92 { 93 "target": 8080, 94 "published": 9090, 95 "protocol": "tcp" 96 }, 97 { 98 "target": 8081, 99 "published": 9091, 100 "protocol": "tcp" 101 }, 102 { 103 "target": 22, 104 "published": 49100, 105 "protocol": "tcp" 106 }, 107 { 108 "target": 8001, 109 "published": 8001, 110 "protocol": "tcp" 111 }, 112 { 113 "target": 5000, 114 "published": 5000, 115 "protocol": "tcp" 116 }, 117 { 118 "target": 5001, 119 "published": 5001, 120 "protocol": "tcp" 121 }, 122 { 123 "target": 5002, 124 "published": 5002, 125 "protocol": "tcp" 126 }, 127 { 128 "target": 5003, 129 "published": 5003, 130 "protocol": "tcp" 131 }, 132 { 133 "target": 5004, 134 "published": 5004, 135 "protocol": "tcp" 136 }, 137 { 138 "target": 5005, 139 "published": 5005, 140 "protocol": "tcp" 141 }, 142 { 143 "target": 5006, 144 "published": 5006, 145 "protocol": "tcp" 146 }, 147 { 148 "target": 5007, 149 "published": 5007, 150 "protocol": "tcp" 151 }, 152 { 153 "target": 5008, 154 "published": 5008, 155 "protocol": "tcp" 156 }, 157 { 158 "target": 5009, 159 "published": 5009, 160 "protocol": "tcp" 161 }, 162 { 163 "target": 5010, 164 "published": 5010, 165 "protocol": "tcp" 166 } 167 ], 168 "stdin_open": true, 169 "tty": true, 170 "read_only": true, 171 "expose": [ 172 "3000", 173 "8000" 174 ], 175 "volumes": [ 176 { 177 "type": "volume", 178 "target": "/var/lib/mysql" 179 }, 180 { 181 "type": "bind", 182 "source": "/opt/data", 183 "target": "/var/lib/mysql" 184 }, 185 { 186 "type": "bind", 187 "source": "../../vendor/github.com/docker/cli/cli/compose/loader", 188 "target": "/code" 189 }, 190 { 191 "type": "bind", 192 "source": "../../vendor/github.com/docker/cli/cli/compose/loader/static", 193 "target": "/var/www/html" 194 }, 195 { 196 "type": "bind", 197 "source": "/home/user/configs", 198 "target": "/etc/configs/", 199 "options": [ 200 "ro" 201 ] 202 }, 203 { 204 "type": "volume", 205 "source": "datavolume", 206 "target": "/var/lib/mysql" 207 }, 208 { 209 "type": "bind", 210 "source": "../../vendor/github.com/docker/cli/cli/compose/loader/opt", 211 "target": "/opt" 212 }, 213 { 214 "type": "tmpfs", 215 "target": "/opt", 216 "options": ["size=10000"] 217 } 218 ], 219 "stop_signal": "SIGUSR1", 220 "stop_grace_period": 20000000000 221 } 222 }, 223 "volumes": { 224 "another-volume": {}, 225 "external-volume": { 226 "external": "external-volume" 227 }, 228 "external-volume3": { 229 "external": "this-is-volume3" 230 }, 231 "other-external-volume": { 232 "external": "my-cool-volume" 233 }, 234 "other-volume": {}, 235 "some-volume": {} 236 } 237 }