line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Paws::ECS::ContainerDefinition; |
2
|
1
|
|
|
1
|
|
588
|
use Moose; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
12
|
|
3
|
|
|
|
|
|
|
has Command => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'command', traits => ['NameInRequest']); |
4
|
|
|
|
|
|
|
has Cpu => (is => 'ro', isa => 'Int', request_name => 'cpu', traits => ['NameInRequest']); |
5
|
|
|
|
|
|
|
has DisableNetworking => (is => 'ro', isa => 'Bool', request_name => 'disableNetworking', traits => ['NameInRequest']); |
6
|
|
|
|
|
|
|
has DnsSearchDomains => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dnsSearchDomains', traits => ['NameInRequest']); |
7
|
|
|
|
|
|
|
has DnsServers => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dnsServers', traits => ['NameInRequest']); |
8
|
|
|
|
|
|
|
has DockerLabels => (is => 'ro', isa => 'Paws::ECS::DockerLabelsMap', request_name => 'dockerLabels', traits => ['NameInRequest']); |
9
|
|
|
|
|
|
|
has DockerSecurityOptions => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dockerSecurityOptions', traits => ['NameInRequest']); |
10
|
|
|
|
|
|
|
has EntryPoint => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'entryPoint', traits => ['NameInRequest']); |
11
|
|
|
|
|
|
|
has Environment => (is => 'ro', isa => 'ArrayRef[Paws::ECS::KeyValuePair]', request_name => 'environment', traits => ['NameInRequest']); |
12
|
|
|
|
|
|
|
has Essential => (is => 'ro', isa => 'Bool', request_name => 'essential', traits => ['NameInRequest']); |
13
|
|
|
|
|
|
|
has ExtraHosts => (is => 'ro', isa => 'ArrayRef[Paws::ECS::HostEntry]', request_name => 'extraHosts', traits => ['NameInRequest']); |
14
|
|
|
|
|
|
|
has Hostname => (is => 'ro', isa => 'Str', request_name => 'hostname', traits => ['NameInRequest']); |
15
|
|
|
|
|
|
|
has Image => (is => 'ro', isa => 'Str', request_name => 'image', traits => ['NameInRequest']); |
16
|
|
|
|
|
|
|
has Links => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'links', traits => ['NameInRequest']); |
17
|
|
|
|
|
|
|
has LogConfiguration => (is => 'ro', isa => 'Paws::ECS::LogConfiguration', request_name => 'logConfiguration', traits => ['NameInRequest']); |
18
|
|
|
|
|
|
|
has Memory => (is => 'ro', isa => 'Int', request_name => 'memory', traits => ['NameInRequest']); |
19
|
|
|
|
|
|
|
has MemoryReservation => (is => 'ro', isa => 'Int', request_name => 'memoryReservation', traits => ['NameInRequest']); |
20
|
|
|
|
|
|
|
has MountPoints => (is => 'ro', isa => 'ArrayRef[Paws::ECS::MountPoint]', request_name => 'mountPoints', traits => ['NameInRequest']); |
21
|
|
|
|
|
|
|
has Name => (is => 'ro', isa => 'Str', request_name => 'name', traits => ['NameInRequest']); |
22
|
|
|
|
|
|
|
has PortMappings => (is => 'ro', isa => 'ArrayRef[Paws::ECS::PortMapping]', request_name => 'portMappings', traits => ['NameInRequest']); |
23
|
|
|
|
|
|
|
has Privileged => (is => 'ro', isa => 'Bool', request_name => 'privileged', traits => ['NameInRequest']); |
24
|
|
|
|
|
|
|
has ReadonlyRootFilesystem => (is => 'ro', isa => 'Bool', request_name => 'readonlyRootFilesystem', traits => ['NameInRequest']); |
25
|
|
|
|
|
|
|
has Ulimits => (is => 'ro', isa => 'ArrayRef[Paws::ECS::Ulimit]', request_name => 'ulimits', traits => ['NameInRequest']); |
26
|
|
|
|
|
|
|
has User => (is => 'ro', isa => 'Str', request_name => 'user', traits => ['NameInRequest']); |
27
|
|
|
|
|
|
|
has VolumesFrom => (is => 'ro', isa => 'ArrayRef[Paws::ECS::VolumeFrom]', request_name => 'volumesFrom', traits => ['NameInRequest']); |
28
|
|
|
|
|
|
|
has WorkingDirectory => (is => 'ro', isa => 'Str', request_name => 'workingDirectory', traits => ['NameInRequest']); |
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
### main pod documentation begin ### |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Paws::ECS::ContainerDefinition |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 USAGE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This class represents one of two things: |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head3 Arguments in a call to a service |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. |
44
|
|
|
|
|
|
|
Each attribute should be used as a named argument in the calls that expect this type of object. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
As an example, if Att1 is expected to be a Paws::ECS::ContainerDefinition object: |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
$service_obj->Method(Att1 => { Command => $value, ..., WorkingDirectory => $value }); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head3 Results returned from an API call |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Use accessors for each attribute. If Att1 is expected to be an Paws::ECS::ContainerDefinition object: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
$result = $service_obj->Method(...); |
55
|
|
|
|
|
|
|
$result->Att1->Command |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Container definitions are used in task definitions to describe the |
60
|
|
|
|
|
|
|
different containers that are launched as part of a task. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 Command => ArrayRef[Str|Undef] |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
The command that is passed to the container. This parameter maps to |
68
|
|
|
|
|
|
|
C<Cmd> in the Create a container section of the Docker Remote API and |
69
|
|
|
|
|
|
|
the C<COMMAND> parameter to docker run. For more information, see |
70
|
|
|
|
|
|
|
https://docs.docker.com/engine/reference/builder/#cmd. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 Cpu => Int |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
The number of C<cpu> units reserved for the container. A container |
76
|
|
|
|
|
|
|
instance has 1,024 C<cpu> units for every CPU core. This parameter |
77
|
|
|
|
|
|
|
specifies the minimum amount of CPU to reserve for a container, and |
78
|
|
|
|
|
|
|
containers share unallocated CPU units with other containers on the |
79
|
|
|
|
|
|
|
instance with the same ratio as their allocated amount. This parameter |
80
|
|
|
|
|
|
|
maps to C<CpuShares> in the Create a container section of the Docker |
81
|
|
|
|
|
|
|
Remote API and the C<--cpu-shares> option to docker run. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
You can determine the number of CPU units that are available per EC2 |
84
|
|
|
|
|
|
|
instance type by multiplying the vCPUs listed for that instance type on |
85
|
|
|
|
|
|
|
the Amazon EC2 Instances detail page by 1,024. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
For example, if you run a single-container task on a single-core |
88
|
|
|
|
|
|
|
instance type with 512 CPU units specified for that container, and that |
89
|
|
|
|
|
|
|
is the only task running on the container instance, that container |
90
|
|
|
|
|
|
|
could use the full 1,024 CPU unit share at any given time. However, if |
91
|
|
|
|
|
|
|
you launched another copy of the same task on that container instance, |
92
|
|
|
|
|
|
|
each task would be guaranteed a minimum of 512 CPU units when needed, |
93
|
|
|
|
|
|
|
and each container could float to higher CPU usage if the other |
94
|
|
|
|
|
|
|
container was not using it, but if both tasks were 100% active all of |
95
|
|
|
|
|
|
|
the time, they would be limited to 512 CPU units. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The Docker daemon on the container instance uses the CPU value to |
98
|
|
|
|
|
|
|
calculate the relative CPU share ratios for running containers. For |
99
|
|
|
|
|
|
|
more information, see CPU share constraint in the Docker documentation. |
100
|
|
|
|
|
|
|
The minimum valid CPU share value that the Linux kernel allows is 2; |
101
|
|
|
|
|
|
|
however, the CPU parameter is not required, and you can use CPU values |
102
|
|
|
|
|
|
|
below 2 in your container definitions. For CPU values below 2 |
103
|
|
|
|
|
|
|
(including null), the behavior varies based on your Amazon ECS |
104
|
|
|
|
|
|
|
container agent version: |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
B<Agent versions less than or equal to 1.1.0:> Null and zero CPU values |
111
|
|
|
|
|
|
|
are passed to Docker as 0, which Docker then converts to 1,024 CPU |
112
|
|
|
|
|
|
|
shares. CPU values of 1 are passed to Docker as 1, which the Linux |
113
|
|
|
|
|
|
|
kernel converts to 2 CPU shares. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item * |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
B<Agent versions greater than or equal to 1.2.0:> Null, zero, and CPU |
118
|
|
|
|
|
|
|
values of 1 are passed to Docker as 2. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=back |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 DisableNetworking => Bool |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
When this parameter is true, networking is disabled within the |
127
|
|
|
|
|
|
|
container. This parameter maps to C<NetworkDisabled> in the Create a |
128
|
|
|
|
|
|
|
container section of the Docker Remote API. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 DnsSearchDomains => ArrayRef[Str|Undef] |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
A list of DNS search domains that are presented to the container. This |
134
|
|
|
|
|
|
|
parameter maps to C<DnsSearch> in the Create a container section of the |
135
|
|
|
|
|
|
|
Docker Remote API and the C<--dns-search> option to docker run. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 DnsServers => ArrayRef[Str|Undef] |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
A list of DNS servers that are presented to the container. This |
141
|
|
|
|
|
|
|
parameter maps to C<Dns> in the Create a container section of the |
142
|
|
|
|
|
|
|
Docker Remote API and the C<--dns> option to docker run. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 DockerLabels => L<Paws::ECS::DockerLabelsMap> |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
A key/value map of labels to add to the container. This parameter maps |
148
|
|
|
|
|
|
|
to C<Labels> in the Create a container section of the Docker Remote API |
149
|
|
|
|
|
|
|
and the C<--label> option to docker run. This parameter requires |
150
|
|
|
|
|
|
|
version 1.18 of the Docker Remote API or greater on your container |
151
|
|
|
|
|
|
|
instance. To check the Docker Remote API version on your container |
152
|
|
|
|
|
|
|
instance, log into your container instance and run the following |
153
|
|
|
|
|
|
|
command: C<sudo docker version | grep "Server API version"> |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 DockerSecurityOptions => ArrayRef[Str|Undef] |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
A list of strings to provide custom labels for SELinux and AppArmor |
159
|
|
|
|
|
|
|
multi-level security systems. This parameter maps to C<SecurityOpt> in |
160
|
|
|
|
|
|
|
the Create a container section of the Docker Remote API and the |
161
|
|
|
|
|
|
|
C<--security-opt> option to docker run. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
The Amazon ECS container agent running on a container instance must |
164
|
|
|
|
|
|
|
register with the C<ECS_SELINUX_CAPABLE=true> or |
165
|
|
|
|
|
|
|
C<ECS_APPARMOR_CAPABLE=true> environment variables before containers |
166
|
|
|
|
|
|
|
placed on that instance can use these security options. For more |
167
|
|
|
|
|
|
|
information, see Amazon ECS Container Agent Configuration in the |
168
|
|
|
|
|
|
|
I<Amazon EC2 Container Service Developer Guide>. |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head2 EntryPoint => ArrayRef[Str|Undef] |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Early versions of the Amazon ECS container agent do not properly handle |
174
|
|
|
|
|
|
|
C<entryPoint> parameters. If you have problems using C<entryPoint>, |
175
|
|
|
|
|
|
|
update your container agent or enter your commands and arguments as |
176
|
|
|
|
|
|
|
C<command> array items instead. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
The entry point that is passed to the container. This parameter maps to |
179
|
|
|
|
|
|
|
C<Entrypoint> in the Create a container section of the Docker Remote |
180
|
|
|
|
|
|
|
API and the C<--entrypoint> option to docker run. For more information, |
181
|
|
|
|
|
|
|
see https://docs.docker.com/engine/reference/builder/#entrypoint. |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 Environment => ArrayRef[L<Paws::ECS::KeyValuePair>] |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
The environment variables to pass to a container. This parameter maps |
187
|
|
|
|
|
|
|
to C<Env> in the Create a container section of the Docker Remote API |
188
|
|
|
|
|
|
|
and the C<--env> option to docker run. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
We do not recommend using plain text environment variables for |
191
|
|
|
|
|
|
|
sensitive information, such as credential data. |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head2 Essential => Bool |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
If the C<essential> parameter of a container is marked as C<true>, and |
197
|
|
|
|
|
|
|
that container fails or stops for any reason, all other containers that |
198
|
|
|
|
|
|
|
are part of the task are stopped. If the C<essential> parameter of a |
199
|
|
|
|
|
|
|
container is marked as C<false>, then its failure does not affect the |
200
|
|
|
|
|
|
|
rest of the containers in a task. If this parameter is omitted, a |
201
|
|
|
|
|
|
|
container is assumed to be essential. |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
All tasks must have at least one essential container. If you have an |
204
|
|
|
|
|
|
|
application that is composed of multiple containers, you should group |
205
|
|
|
|
|
|
|
containers that are used for a common purpose into components, and |
206
|
|
|
|
|
|
|
separate the different components into multiple task definitions. For |
207
|
|
|
|
|
|
|
more information, see Application Architecture in the I<Amazon EC2 |
208
|
|
|
|
|
|
|
Container Service Developer Guide>. |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=head2 ExtraHosts => ArrayRef[L<Paws::ECS::HostEntry>] |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
A list of hostnames and IP address mappings to append to the |
214
|
|
|
|
|
|
|
C</etc/hosts> file on the container. This parameter maps to |
215
|
|
|
|
|
|
|
C<ExtraHosts> in the Create a container section of the Docker Remote |
216
|
|
|
|
|
|
|
API and the C<--add-host> option to docker run. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=head2 Hostname => Str |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
The hostname to use for your container. This parameter maps to |
222
|
|
|
|
|
|
|
C<Hostname> in the Create a container section of the Docker Remote API |
223
|
|
|
|
|
|
|
and the C<--hostname> option to docker run. |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=head2 Image => Str |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
The image used to start a container. This string is passed directly to |
229
|
|
|
|
|
|
|
the Docker daemon. Images in the Docker Hub registry are available by |
230
|
|
|
|
|
|
|
default. Other repositories are specified with C< |
231
|
|
|
|
|
|
|
I<repository-url>/I<image>:I<tag> >. Up to 255 letters (uppercase and |
232
|
|
|
|
|
|
|
lowercase), numbers, hyphens, underscores, colons, periods, forward |
233
|
|
|
|
|
|
|
slashes, and number signs are allowed. This parameter maps to C<Image> |
234
|
|
|
|
|
|
|
in the Create a container section of the Docker Remote API and the |
235
|
|
|
|
|
|
|
C<IMAGE> parameter of docker run. |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=over |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=item * |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
Images in Amazon ECR repositories use the full registry and repository |
242
|
|
|
|
|
|
|
URI (for example, |
243
|
|
|
|
|
|
|
C<012345678910.dkr.ecr.E<lt>region-nameE<gt>.amazonaws.com/E<lt>repository-nameE<gt>>). |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=item * |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
Images in official repositories on Docker Hub use a single name (for |
248
|
|
|
|
|
|
|
example, C<ubuntu> or C<mongo>). |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=item * |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
Images in other repositories on Docker Hub are qualified with an |
253
|
|
|
|
|
|
|
organization name (for example, C<amazon/amazon-ecs-agent>). |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=item * |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Images in other online repositories are qualified further by a domain |
258
|
|
|
|
|
|
|
name (for example, C<quay.io/assemblyline/ubuntu>). |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=back |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
=head2 Links => ArrayRef[Str|Undef] |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
The C<link> parameter allows containers to communicate with each other |
267
|
|
|
|
|
|
|
without the need for port mappings, using the C<name> parameter and |
268
|
|
|
|
|
|
|
optionally, an C<alias> for the link. This construct is analogous to |
269
|
|
|
|
|
|
|
C<name:alias> in Docker links. Up to 255 letters (uppercase and |
270
|
|
|
|
|
|
|
lowercase), numbers, hyphens, and underscores are allowed for each |
271
|
|
|
|
|
|
|
C<name> and C<alias>. For more information on linking Docker |
272
|
|
|
|
|
|
|
containers, see |
273
|
|
|
|
|
|
|
https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/. |
274
|
|
|
|
|
|
|
This parameter maps to C<Links> in the Create a container section of |
275
|
|
|
|
|
|
|
the Docker Remote API and the C<--link> option to docker run. |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
Containers that are collocated on a single container instance may be |
278
|
|
|
|
|
|
|
able to communicate with each other without requiring links or host |
279
|
|
|
|
|
|
|
port mappings. Network isolation is achieved on the container instance |
280
|
|
|
|
|
|
|
using security groups and VPC settings. |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
=head2 LogConfiguration => L<Paws::ECS::LogConfiguration> |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
The log configuration specification for the container. This parameter |
286
|
|
|
|
|
|
|
maps to C<LogConfig> in the Create a container section of the Docker |
287
|
|
|
|
|
|
|
Remote API and the C<--log-driver> option to docker run. By default, |
288
|
|
|
|
|
|
|
containers use the same logging driver that the Docker daemon uses; |
289
|
|
|
|
|
|
|
however the container may use a different logging driver than the |
290
|
|
|
|
|
|
|
Docker daemon by specifying a log driver with this parameter in the |
291
|
|
|
|
|
|
|
container definition. To use a different logging driver for a |
292
|
|
|
|
|
|
|
container, the log system must be configured properly on the container |
293
|
|
|
|
|
|
|
instance (or on a different log server for remote logging options). For |
294
|
|
|
|
|
|
|
more information on the options for different supported log drivers, |
295
|
|
|
|
|
|
|
see Configure logging drivers in the Docker documentation. |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
Amazon ECS currently supports a subset of the logging drivers available |
298
|
|
|
|
|
|
|
to the Docker daemon (shown in the LogConfiguration data type). |
299
|
|
|
|
|
|
|
Additional log drivers may be available in future releases of the |
300
|
|
|
|
|
|
|
Amazon ECS container agent. |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
This parameter requires version 1.18 of the Docker Remote API or |
303
|
|
|
|
|
|
|
greater on your container instance. To check the Docker Remote API |
304
|
|
|
|
|
|
|
version on your container instance, log into your container instance |
305
|
|
|
|
|
|
|
and run the following command: C<sudo docker version | grep "Server API |
306
|
|
|
|
|
|
|
version"> |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
The Amazon ECS container agent running on a container instance must |
309
|
|
|
|
|
|
|
register the logging drivers available on that instance with the |
310
|
|
|
|
|
|
|
C<ECS_AVAILABLE_LOGGING_DRIVERS> environment variable before containers |
311
|
|
|
|
|
|
|
placed on that instance can use these log configuration options. For |
312
|
|
|
|
|
|
|
more information, see Amazon ECS Container Agent Configuration in the |
313
|
|
|
|
|
|
|
I<Amazon EC2 Container Service Developer Guide>. |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=head2 Memory => Int |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
The hard limit (in MiB) of memory to present to the container. If your |
319
|
|
|
|
|
|
|
container attempts to exceed the memory specified here, the container |
320
|
|
|
|
|
|
|
is killed. This parameter maps to C<Memory> in the Create a container |
321
|
|
|
|
|
|
|
section of the Docker Remote API and the C<--memory> option to docker |
322
|
|
|
|
|
|
|
run. |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
You must specify a non-zero integer for one or both of C<memory> or |
325
|
|
|
|
|
|
|
C<memoryReservation> in container definitions. If you specify both, |
326
|
|
|
|
|
|
|
C<memory> must be greater than C<memoryReservation>. If you specify |
327
|
|
|
|
|
|
|
C<memoryReservation>, then that value is subtracted from the available |
328
|
|
|
|
|
|
|
memory resources for the container instance on which the container is |
329
|
|
|
|
|
|
|
placed; otherwise, the value of C<memory> is used. |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
The Docker daemon reserves a minimum of 4 MiB of memory for a |
332
|
|
|
|
|
|
|
container, so you should not specify fewer than 4 MiB of memory for |
333
|
|
|
|
|
|
|
your containers. |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=head2 MemoryReservation => Int |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
The soft limit (in MiB) of memory to reserve for the container. When |
339
|
|
|
|
|
|
|
system memory is under heavy contention, Docker attempts to keep the |
340
|
|
|
|
|
|
|
container memory to this soft limit; however, your container can |
341
|
|
|
|
|
|
|
consume more memory when it needs to, up to either the hard limit |
342
|
|
|
|
|
|
|
specified with the C<memory> parameter (if applicable), or all of the |
343
|
|
|
|
|
|
|
available memory on the container instance, whichever comes first. This |
344
|
|
|
|
|
|
|
parameter maps to C<MemoryReservation> in the Create a container |
345
|
|
|
|
|
|
|
section of the Docker Remote API and the C<--memory-reservation> option |
346
|
|
|
|
|
|
|
to docker run. |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
You must specify a non-zero integer for one or both of C<memory> or |
349
|
|
|
|
|
|
|
C<memoryReservation> in container definitions. If you specify both, |
350
|
|
|
|
|
|
|
C<memory> must be greater than C<memoryReservation>. If you specify |
351
|
|
|
|
|
|
|
C<memoryReservation>, then that value is subtracted from the available |
352
|
|
|
|
|
|
|
memory resources for the container instance on which the container is |
353
|
|
|
|
|
|
|
placed; otherwise, the value of C<memory> is used. |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
For example, if your container normally uses 128 MiB of memory, but |
356
|
|
|
|
|
|
|
occasionally bursts to 256 MiB of memory for short periods of time, you |
357
|
|
|
|
|
|
|
can set a C<memoryReservation> of 128 MiB, and a C<memory> hard limit |
358
|
|
|
|
|
|
|
of 300 MiB. This configuration would allow the container to only |
359
|
|
|
|
|
|
|
reserve 128 MiB of memory from the remaining resources on the container |
360
|
|
|
|
|
|
|
instance, but also allow the container to consume more memory resources |
361
|
|
|
|
|
|
|
when needed. |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=head2 MountPoints => ArrayRef[L<Paws::ECS::MountPoint>] |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
The mount points for data volumes in your container. This parameter |
367
|
|
|
|
|
|
|
maps to C<Volumes> in the Create a container section of the Docker |
368
|
|
|
|
|
|
|
Remote API and the C<--volume> option to docker run. |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
=head2 Name => Str |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
The name of a container. If you are linking multiple containers |
374
|
|
|
|
|
|
|
together in a task definition, the C<name> of one container can be |
375
|
|
|
|
|
|
|
entered in the C<links> of another container to connect the containers. |
376
|
|
|
|
|
|
|
Up to 255 letters (uppercase and lowercase), numbers, hyphens, and |
377
|
|
|
|
|
|
|
underscores are allowed. This parameter maps to C<name> in the Create a |
378
|
|
|
|
|
|
|
container section of the Docker Remote API and the C<--name> option to |
379
|
|
|
|
|
|
|
docker run. |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=head2 PortMappings => ArrayRef[L<Paws::ECS::PortMapping>] |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
The list of port mappings for the container. Port mappings allow |
385
|
|
|
|
|
|
|
containers to access ports on the host container instance to send or |
386
|
|
|
|
|
|
|
receive traffic. This parameter maps to C<PortBindings> in the Create a |
387
|
|
|
|
|
|
|
container section of the Docker Remote API and the C<--publish> option |
388
|
|
|
|
|
|
|
to docker run. If the network mode of a task definition is set to |
389
|
|
|
|
|
|
|
C<none>, then you cannot specify port mappings. If the network mode of |
390
|
|
|
|
|
|
|
a task definition is set to C<host>, then host ports must either be |
391
|
|
|
|
|
|
|
undefined or they must match the container port in the port mapping. |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
After a task reaches the C<RUNNING> status, manual and automatic host |
394
|
|
|
|
|
|
|
and container port assignments are visible in the B<Network Bindings> |
395
|
|
|
|
|
|
|
section of a container description of a selected task in the Amazon ECS |
396
|
|
|
|
|
|
|
console, or the C<networkBindings> section DescribeTasks responses. |
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
=head2 Privileged => Bool |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
When this parameter is true, the container is given elevated privileges |
402
|
|
|
|
|
|
|
on the host container instance (similar to the C<root> user). This |
403
|
|
|
|
|
|
|
parameter maps to C<Privileged> in the Create a container section of |
404
|
|
|
|
|
|
|
the Docker Remote API and the C<--privileged> option to docker run. |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head2 ReadonlyRootFilesystem => Bool |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
When this parameter is true, the container is given read-only access to |
410
|
|
|
|
|
|
|
its root file system. This parameter maps to C<ReadonlyRootfs> in the |
411
|
|
|
|
|
|
|
Create a container section of the Docker Remote API and the |
412
|
|
|
|
|
|
|
C<--read-only> option to C<docker run>. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=head2 Ulimits => ArrayRef[L<Paws::ECS::Ulimit>] |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
A list of C<ulimits> to set in the container. This parameter maps to |
418
|
|
|
|
|
|
|
C<Ulimits> in the Create a container section of the Docker Remote API |
419
|
|
|
|
|
|
|
and the C<--ulimit> option to docker run. Valid naming values are |
420
|
|
|
|
|
|
|
displayed in the Ulimit data type. This parameter requires version 1.18 |
421
|
|
|
|
|
|
|
of the Docker Remote API or greater on your container instance. To |
422
|
|
|
|
|
|
|
check the Docker Remote API version on your container instance, log |
423
|
|
|
|
|
|
|
into your container instance and run the following command: C<sudo |
424
|
|
|
|
|
|
|
docker version | grep "Server API version"> |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
=head2 User => Str |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
The user name to use inside the container. This parameter maps to |
430
|
|
|
|
|
|
|
C<User> in the Create a container section of the Docker Remote API and |
431
|
|
|
|
|
|
|
the C<--user> option to docker run. |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
=head2 VolumesFrom => ArrayRef[L<Paws::ECS::VolumeFrom>] |
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
Data volumes to mount from another container. This parameter maps to |
437
|
|
|
|
|
|
|
C<VolumesFrom> in the Create a container section of the Docker Remote |
438
|
|
|
|
|
|
|
API and the C<--volumes-from> option to docker run. |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
=head2 WorkingDirectory => Str |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
The working directory in which to run commands inside the container. |
444
|
|
|
|
|
|
|
This parameter maps to C<WorkingDir> in the Create a container section |
445
|
|
|
|
|
|
|
of the Docker Remote API and the C<--workdir> option to docker run. |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
=head1 SEE ALSO |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
This class forms part of L<Paws>, describing an object used in L<Paws::ECS> |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
=cut |
460
|
|
|
|
|
|
|
|