docker.container-cp
Collect a file by copying from a running docker container
collect:
v1:
- docker.container-cp:
description: the supergoodtool www site access logs
container: supergoodtool-www
src_path: /var/log/nginx/access.log
output_dir: /www/access/
collect:
v1:
- docker.container-cp:
description: the supergoodtool www site access logs
labels:
- container.name.label
src_path: /var/log/nginx/access.log
output_dir: /www/access/
collect:
v1:
- docker.container-cp:
description: the supergoodtool www site access logs
labels:
- container.name.label
src_path: /var/log/nginx/access.log
output_dir: /www/access/
include_empty: true
Required Parameters
src_path- The path of the target file in the container’s filesystem
Optional Parameters
container- The name of the container to copy fromlabels- Labels shared by the container(s) to copy from
Outputs
{{.Name}}- Output will match the name of the file. Ifsrc_pathis/var/log/nginx/access.log, thenoutput_dirwill contain a fileaccess.log{{.Name}}- Output will match the name of the file. Ifsrc_pathis/var/log/nginx/access.log, thenoutput_dirwill contain a fileaccess.log
Shared Parameters
This spec also inherits all of the required and optional Shared Parameters