-
Notifications
You must be signed in to change notification settings - Fork 17
/
schema.yml
221 lines (217 loc) · 6.85 KB
/
schema.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
type: map
mapping:
=:
type: map
required: true
name: Service
mapping:
"image":
name: Image
desc: >
Tag or partial image ID. Can be local or remote - Compose will attempt to pull if it doesn't exist locally.
required: false
"build":
desc: >
Path to a directory containing a Dockerfile. This directory is also the build context that is sent to the
Docker daemon.
Compose will build and tag it with a generated name, and use that image thereafter.
required: false
"command":
desc: >
Override the default command.
type: any
required: false
"links":
desc: >
Link to containers in another service. Either specify both the service name and the link alias
(SERVICE:ALIAS), or just the service name (which will also be used for the alias).
type: seq
sequence:
- type: str
name: Link
required: false
"external_links":
name: ExternalLink
desc: >
Link to containers started outside this docker-compose.yml or even outside of Compose, especially for
containers that provide shared or common services. external_links follow semantics similar to links when
specifying both the container name and the link alias (CONTAINER:ALIAS).
type: seq
sequence:
- type: str
required: false
"ports":
desc: >
Expose ports. Either specify both ports (HOST:CONTAINER), or just the container port (a random host port will
be chosen).
type: seq
sequence:
- type: text
name: Port
required: false
"expose":
desc: >
Expose ports without publishing them to the host machine - they'll only be accessible to linked services. Only
the internal port can be specified.
type: seq
sequence:
- type: text
name: Expose
required: false
"volumes":
desc: >
Mount paths as volumes, optionally specifying a path on the host machine (HOST:CONTAINER), or an access mode
(HOST:CONTAINER:ro).
type: seq
sequence:
- type: str
required: false
"volumes_from":
desc: >
Mount all of the volumes from another service or container.
type: seq
sequence:
- type: str
required: false
"environment":
name: Environment
desc: >
Add environment variables. You can use an array or a hash sequence.
Environment variables with only a key are resolved to their values on the machine Compose is running on, which
can be helpful for secret or host-specific values.
type: any
required: false
"env_file":
desc: >
Add environment variables from a file. Can be a single value or a list.
If you have specified a Compose file with docker-compose -f FILE, paths in env_file are relative to the
directory that file is in.
Environment variables specified in environment override these values.
type: any
required: false
"extends":
desc: >
Extend another service, in the current file or another, optionally overriding configuration.
type: map
mapping:
"file":
required: true
"service":
required: true
required: false
"labels":
desc: >
Add metadata to containers using Docker labels.
type: seq
sequence:
- type: str
required: false
"net":
name: Net
desc: >
Networking mode. Use the same values as the docker client --net parameter.
required: false
"pid":
name: Pid
desc: >
Sets the PID mode to the host PID mode. This turns on sharing between container and the host operating system
the PID address space. Containers launched with this flag will be able to access and manipulate other
containers in the bare-metal machine's namespace and vise-versa.
required: false
"dns":
name: DNS
desc: >
Custom DNS servers. Can be a single value or a list.
type: any
required: false
"cap_add":
desc: >
Add container capabilities. See man 7 capabilities for a full list.
type: seq
sequence:
- type: str
required: false
"cap_drop":
desc: >
Drop container capabilities. See man 7 capabilities for a full list.
type: seq
sequence:
- type: str
required: false
"dns_search":
name: DNSSearch
desc: >
Custom DNS search domains. Can be a single value or a list.
type: any
required: false
"working_dir":
desc: >
Working directory inside the container.
required: false
"entrypoint":
desc: >
Overwrite the default ENTRYPOINT of the image.
required: false
"user":
desc: >
Username or UID.
required: false
"hostname":
desc: >
Container host name.
required: false
"domainname":
desc: >
Domain name associated with your service
required: false
"mac_address":
name: MACAddress
desc: >
Container's Ethernet device's MAC address
required: false
"mem_limit":
desc: >
Total memory limit (format: <number><optional unit>, where unit = b, k, m or g)
required: false
"memswap_limit":
desc: >
Total memory swap limit (format: -1 or <number><optional unit>, where unit = b, k, m or g)
required: false
"privileged":
name: Privileged
desc: >
Give extended privileges to this container
required: false
"restart":
name: Restart
desc: >
Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
required: false
"stdin_open":
desc: >
Value of true keeps STDIN open even if not attached
required: false
"tty":
name: TTY
desc: >
Allocate a pseudo-TTY
required: false
"cpu_shares":
name: CPUShares
desc: >
CPU shares (relative weight)
required: false
"cpuset":
name: CPUSet
desc: >
Set CPUs in which to allow execution for containers. ("0-3", "1,3")
required: false
"read_only":
name: ReadOnly
desc: >
Mount the container's root filesystem as read only
required: false
"volume_driver":
desc: >
Optional volume driver for the container
required: false