Skip to content

Commit e3a3145

Browse files
author
Misty Stanley-Jones
committed
Sync vnext-engine branch to docker/docker SHA 2f12d28
This branch will contain forward-looking Engine-specific docs and be the equivalent of docker/docker master for docs
1 parent 0658ba7 commit e3a3145

File tree

111 files changed

+1138
-647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1138
-647
lines changed

engine/admin/ambassador_pattern_linking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ case `192.168.1.52:6379`.
150150
apk add socat && \
151151
rm -r /var/cache/
152152

153-
CMD env | grep _TCP= | (sed 's/.*_PORT_\([0-9]*\)_TCP=tcp:\/\/\(.*\):\(.*\)/socat -t 100000000 TCP4-LISTEN:\1,fork,reuseaddr TCP4:\2:\3 \&/' && echo wait) | sh
153+
CMD env | grep _TCP= | (sed 's/.*_PORT_\([0-9]*\)_TCP=tcp:\/\/\(.*\):\(.*\)/socat -t 100000000 TCP4-LISTEN:\1,fork,reuseaddr TCP4:\2:\3 \&/' && echo wait) | sh

engine/admin/b2d_volume_resize.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,4 @@ VirtualBox.
158158

159159
<img src="/articles/b2d_volume_images/verify.png">
160160

161-
You're done!
161+
You're done!

engine/admin/chef.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ docker_container 'my_nginx' do
6767
env 'FOO=bar'
6868
subscribes :redeploy, 'docker_image[nginx]'
6969
end
70-
```
70+
```

engine/admin/dsc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,4 @@ container:
166166
```powershell
167167
$containerProps = @{Name="web"; Image="node:latest"; Port="80:80"; `
168168
Env="PORT=80"; Link="db:db"; Command="grunt"}
169-
```
169+
```

engine/admin/formatting.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ list of elements they support in their templates:
1313
- [Docker Log Tag formatting](logging/log_tags.md)
1414
- [Docker Network Inspect formatting](../reference/commandline/network_inspect.md)
1515
- [Docker PS formatting](../reference/commandline/ps.md#formatting)
16+
- [Docker Stats formatting](../reference/commandline/stats.md#formatting)
1617
- [Docker Volume Inspect formatting](../reference/commandline/volume_inspect.md)
1718
- [Docker Version formatting](../reference/commandline/version.md#examples)
1819

@@ -26,46 +27,36 @@ This is the complete list of the available functions with examples:
2627
Join concatenates a list of strings to create a single string.
2728
It puts a separator between each element in the list.
2829

29-
{% raw %}
3030
$ docker ps --format '{{join .Names " or "}}'
31-
{% endraw %}
3231

3332
### Json
3433

3534
Json encodes an element as a json string.
3635

37-
{% raw %}
3836
$ docker inspect --format '{{json .Mounts}}' container
39-
{% endraw %}
4037

4138
### Lower
4239

4340
Lower turns a string into its lower case representation.
4441

45-
{% raw %}
4642
$ docker inspect --format "{{lower .Name}}" container
47-
{% endraw %}
4843

4944
### Split
5045

5146
Split slices a string into a list of strings separated by a separator.
5247

5348
{% raw %}
54-
$ docker inspect --format '{{split (join .Names "/") "/"}}' container
55-
{% endraw %}
49+
# docker inspect --format '{{split (join .Names "/") "/"}}' container
50+
{% endraw %}
5651

5752
### Title
5853

5954
Title capitalizes a string.
6055

61-
{% raw %}
6256
$ docker inspect --format "{{title .Name}}" container
63-
{% endraw %}
6457

6558
### Upper
6659

67-
Upper turns a string into its upper case representation.
60+
Upper turms a string into its upper case representation.
6861

69-
{% raw %}
7062
$ docker inspect --format "{{upper .Name}}" container
71-
{% endraw %}

engine/admin/logging/awslogs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ and `logs:PutLogEvents` actions, as shown in the following example.
8282
"Resource": "*"
8383
}
8484
]
85-
}
85+
}

engine/admin/logging/etwlogs.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
description: Describes how to use the etwlogs logging driver.
33
keywords: ETW, docker, logging, driver
4-
title: ETW logging driver
5-
---
64

75
The ETW logging driver forwards container logs as ETW events.
86
ETW stands for Event Tracing in Windows, and is the common framework
@@ -58,4 +56,4 @@ context information. Note that the time stamp is also available within the ETW e
5856

5957
**Note** This ETW provider emits only a message string, and not a specially
6058
structured ETW event. Therefore, it is not required to register a manifest file
61-
with the system to read and interpret its ETW events.
59+
with the system to read and interpret its ETW events.

engine/admin/logging/fluentd.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ The `docker logs` command is not available for this logging driver.
2828

2929
Some options are supported by specifying `--log-opt` as many times as needed:
3030

31-
{% raw %}
3231
- `fluentd-address`: specify `host:port` to connect `localhost:24224`
3332
- `tag`: specify tag for fluentd message, which interpret some markup, ex `{{.ID}}`, `{{.FullID}}` or `{{.Name}}` `docker.{{.ID}}`
34-
{% endraw %}
3533

3634

3735
Configure the default logging driver by passing the
@@ -109,4 +107,4 @@ aggregate store.
109107

110108
3. Start one or more containers with the `fluentd` logging driver:
111109

112-
$ docker run --log-driver=fluentd your/application
110+
$ docker run --log-driver=fluentd your/application

engine/admin/logging/gcplogs.md

+18
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ takes precedence over information discovered from the metadata server so a
3434
Docker daemon running in a Google Cloud Project can be overridden to log to a
3535
different Google Cloud Project using `--gcp-project`.
3636

37+
Docker fetches the values for zone, instance name and instance id from Google
38+
Cloud metadata server. Those values can be provided via options if metadata
39+
server is not available. They will not override the values from metadata server.
40+
3741
## gcplogs options
3842

3943
You can use the `--log-opt NAME=VALUE` flag to specify these additional Google
@@ -45,6 +49,9 @@ Cloud Logging driver options:
4549
| `gcp-log-cmd` | optional | Whether to log the command that the container was started with. Defaults to false. |
4650
| `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for container. |
4751
| `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for container. |
52+
| `gcp-meta-zone` | optional | Zone name for the instance. |
53+
| `gcp-meta-name` | optional | Instance name. |
54+
| `gcp-meta-id` | optional | Instance ID. |
4855

4956
If there is collision between `label` and `env` keys, the value of the `env`
5057
takes precedence. Both options add additional fields to the attributes of a
@@ -54,6 +61,8 @@ Below is an example of the logging options required to log to the default
5461
logging destination which is discovered by querying the GCE metadata server.
5562

5663
docker run --log-driver=gcplogs \
64+
--log-opt labels=location \
65+
--log-opt env=TEST \
5766
--log-opt gcp-log-cmd=true \
5867
--env "TEST=false" \
5968
--label location=west \
@@ -62,3 +71,12 @@ logging destination which is discovered by querying the GCE metadata server.
6271
This configuration also directs the driver to include in the payload the label
6372
`location`, the environment variable `ENV`, and the command used to start the
6473
container.
74+
75+
An example of the logging options for running outside of GCE (the daemon must be
76+
configured with GOOGLE_APPLICATION_CREDENTIALS):
77+
78+
docker run --log-driver=gcplogs \
79+
--log-opt gcp-project=test-project
80+
--log-opt gcp-meta-zone=west1 \
81+
--log-opt gcp-meta-name=`hostname` \
82+
your/application

engine/admin/logging/journald.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,5 @@ import systemd.journal
9797
reader = systemd.journal.Reader()
9898
reader.add_match('CONTAINER_NAME=web')
9999

100-
for msg in reader:
101-
print '{CONTAINER_ID_FULL}: {MESSAGE}'.format(**msg)
102-
```
103-
104-
## `journald` configuration
105-
106-
Docker hosts with many containers may produce large amounts of logging data.
107-
By default, `journald` limits the number of messages stored per service per
108-
time-unit.
109-
110-
If your application needs large-scale logging, configure `RateLimitIntervalSec`
111-
and `RateLimitBurst` in the `journald` configuration file. By default,
112-
`systemd` drops messages in excess of 1000 messages per service per 30 seconds.
113-
For more information about configuring `journald`, see the
114-
[`journald` documentation](https://www.freedesktop.org/software/systemd/man/journald.conf.html).
100+
for msg in reader:
101+
print '{CONTAINER_ID_FULL}: {MESSAGE}'.format(**msg)

engine/admin/logging/log_tags.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224 --l
1616

1717
Docker supports some special template markup you can use when specifying a tag's value:
1818

19-
{% raw %}
2019
| Markup | Description |
2120
|--------------------|------------------------------------------------------|
2221
| `{{.ID}}` | The first 12 characters of the container id. |
@@ -28,37 +27,34 @@ Docker supports some special template markup you can use when specifying a tag's
2827
| `{{.DaemonName}}` | The name of the docker program (`docker`). |
2928

3029
For example, specifying a `--log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}"` value yields `syslog` log lines like:
31-
{% endraw %}
3230

3331
```
3432
Aug 7 18:33:19 HOSTNAME docker/hello-world/foobar/5790672ab6a0[9103]: Hello from Docker.
3533
```
3634

37-
{% raw %}
3835
At startup time, the system sets the `container_name` field and `{{.Name}}` in
3936
the tags. If you use `docker rename` to rename a container, the new name is not
4037
reflected in the log messages. Instead, these messages continue to use the
4138
original container name.
42-
{% endraw %}
4339

4440
For advanced usage, the generated tag's use [go
4541
templates](http://golang.org/pkg/text/template/) and the container's [logging
4642
context](https://github.com/docker/docker/blob/master/daemon/logger/context.go).
4743

4844
As an example of what is possible with the syslog logger:
4945

50-
```{% raw %}
46+
```
5147
$ docker run -it --rm \
5248
--log-driver syslog \
5349
--log-opt tag="{{ (.ExtraAttributes nil).SOME_ENV_VAR }}" \
5450
--log-opt env=SOME_ENV_VAR \
5551
-e SOME_ENV_VAR=logtester.1234 \
5652
flyinprogrammer/logtester
57-
{% endraw %}```
53+
```
5854

5955
Results in logs like this:
6056

6157
```
6258
Apr 1 15:22:17 ip-10-27-39-73 docker/logtester.1234[45499]: + exec app
6359
Apr 1 15:22:17 ip-10-27-39-73 docker/logtester.1234[45499]: 2016-04-01 15:22:17.075416751 +0000 UTC stderr msg: 1
64-
```
60+
```

engine/admin/logging/overview.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
description: Configure logging driver.
33
keywords: docker, logging, driver, Fluentd
44
redirect_from:
5-
- /engine/reference/logging/overview/
65
title: Configure logging drivers
76
---
87

@@ -251,7 +250,10 @@ $ docker run -dit \
251250

252251
## `fluentd`
253252

254-
### Options
253+
The `gelf-compression-level` option can be used to change the level of
254+
compresssion when `gzip` or `zlib` is selected as `gelf-compression-type`.
255+
Accepted value must be from -1 to 9 (BestCompression). Higher levels
256+
typically run slower but compress more. Default value is 1 (BestSpeed).
255257

256258
The `fluentd` logging driver supports the following options:
257259

@@ -280,11 +282,6 @@ $ docker run -dit \
280282
{% endraw %}
281283
```
282284

283-
> **Note**: If the container cannot connect to the Fluentd daemon on the
284-
specified address and `fluentd-async-connect` is set to `false`, the container
285-
stops immediately.
286-
287-
288285
For detailed information on working with the `fluentd` logging driver, see
289286
[the fluentd logging driver](fluentd.md)
290287

0 commit comments

Comments
 (0)