mirror of https://github.com/docker/docs.git
Added note on tag formatting of docker image (#3207)
* Added note on tag formatting of docker image Signed-off-by: French Ben <frenchben@docker.com> * Updated notes Signed-off-by: French Ben <frenchben@docker.com>
This commit is contained in:
parent
bd18b17f4e
commit
fe0620225d
|
@ -74,7 +74,7 @@ $ docker run --log-driver=awslogs \
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note:**
|
> **Note**:
|
||||||
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`.
|
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`.
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,6 +87,14 @@ When both `awslogs-stream` and `tag` are specified, the value supplied for `awsl
|
||||||
|
|
||||||
If not specified, the container ID is used as the log stream.
|
If not specified, the container ID is used as the log stream.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
> **Note**:
|
||||||
|
> The CloudWatch log API doesn't support `:` in the log name. This can cause some issues when using the `{{ .ImageName }}` as a tag, since a docker image has a format of `IMAGE:TAG`, such as `alpine:latest`.
|
||||||
|
> Template markup can be used to get the proper format.
|
||||||
|
> To get the image name and the first 12 characters of the container id, you can use: `--log-opt tag='{{ with split .ImageName ":" }}{{join . "_"}}{{end}}-{{.ID}}'`
|
||||||
|
> the output will be something like: `alpine_latest-bf0072049c76`
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
|
||||||
## Credentials
|
## Credentials
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue