Editing Docker

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 172: Line 172:
 
* <code>[[docker secrets]]</code> (Feb 2017)<ref>https://www.docker.com/blog/docker-secrets-management/</ref> ([[swarm]] mode only)
 
* <code>[[docker secrets]]</code> (Feb 2017)<ref>https://www.docker.com/blog/docker-secrets-management/</ref> ([[swarm]] mode only)
  
== [[Docker logging]] ==
+
== Docker logging ==
 +
Docker support logging to format or different platforms, such as, json-file, syslog, journald, gelf, fluentd, awslogs, splunk, etwlogs, gcplogs and logentries.<ref>https://docs.docker.com/config/containers/logging/configure/</ref>
 +
* Configuration is done at docker container start time with command <code>docker run -it --log-drive LOG_METHOD CONTAINER_ID</code>
 +
* Check method configured in a running container:
 +
** <code>docker inspect -f '{{.HostConfig.LogConfig.Type}}' CONTAINER_ID</code>
 +
** <code>docker inspect -f '{{.HostConfig.LogConfig}}' CONTAINER_ID</code>
 +
* View [[logs]]
 +
:<code>[[docker logs]] CONTAINER_NAME_OR_ID</code> (Docker Community Engine only support: local, json-file and [[journald]])
 +
:<code>[[docker logs]] CONTAINER_NAME_OR_ID</code> 2>&1 | grep "STRING_TO_SEARCH"</code> (You will need to redirect outputs to be able to grep output)<ref>https://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container</ref>
 +
:See https://docs.docker.com/config/containers/logging/ for more information
  
 
== Related terms==
 
== Related terms==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: