Using Docker Desktop for Windows v 18.09.1 on Windows 10. After a completely clean reset of Docker, I add "log-driver": "journald" via Settings; restart Docker.
Confirm the logging driver journald is enabled:
$ docker info | grep Log
Logging Driver: journald
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Then run docker run hello-world and get this:
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pulling fs layer
1b930d010525: Verifying Checksum
1b930d010525: Download complete
1b930d010525: Pull complete
Digest: sha256:2557e3c07ed1e38f26e389462d03ed943586f744621577a99efb77324b0fe535
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: failed to initialize logging driver: journald is not enabled on this host.
Then run docker run centos and get this:
$ docker run centos
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
a02a4930cb5d: Pulling fs layer
a02a4930cb5d: Download complete
a02a4930cb5d: Pull complete
Digest: sha256:184e5f35598e333bfa7de10d8fb1cebb5ee4df5bc0f970bf2b1e7c7345136426
Status: Downloaded newer image for centos:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: failed to initialize logging driver: journald is not enabled on this host.
I haven’t seen any docs/discussions saying that journald doesn’t work on Docker Desktop for Windows, and it seems like it should, but it’s not working. What am I missing?
Version details:
$ docker version
Client: Docker Engine - Community
Version: 18.09.1
API version: 1.39
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:34:26 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 4c52b90
Built: Wed Jan 9 19:41:49 2019
OS/Arch: linux/amd64
Experimental: false
Thanks Gary! I saw Journald Logging Driver page and it mentions the following which led me to believe it might be supported. I appreciate the clarity.
To use the journald driver as the default logging driver, set the log-driver and log-opt keys to appropriate values in the daemon.json file, which is located in /etc/docker/ on Linux hosts or C:\ProgramData\docker\config\daemon.json on Windows Server.
Is there a definitive list of log drivers that are supported by Docker Desktop for Windows?
Here’s a list of the drivers and whether they support Linux or Windows.
You can display the supported Docker Windows drivers by running the docker system info command on the Docker Windows node.
A little format magic.
PS C:\Users\Administrator> docker system info --format '{{ .Plugins.Log }}
[awslogs etwlogs fluentd gelf json-file local logentries splunk syslog]
json-file Default. Writes logging messages to the local file system on the Docker Node.
Linux containers or Windows containers.
syslog Writes logging messages to the syslog facility.
Linux containers or Windows containers.
Requires a network connection to a Syslog server.
journald Writes log messages to journald. The journald daemon must be running on the host machine.
Linux containers Only. Cannot run Windows containers on a Docker Linux node
gelf Writes log messages to a Graylog Extended Log Format (GELF) endpoint such as Graylog or Logstash.
Linux containers or Windows containers.
Requires a network connection to a Gelf server.
fluentd Writes log messages to fluentd (forward input).
Linux containers or Windows containers.
Requires a network connection to Fluentd daemon.
awslogs Writes log messages to Amazon CloudWatch Logs.
Linux containers or Windows containers.
Docker containers must be running on Docker Nodes running in the AWS Cloud.
splunk Writes log messages to splunk using the HTTP Event Collector.
Linux containers or Windows containers.
Requires a network connection to a Splunk HTTP Event Collector.
etwlogs Writes log messages as Event Tracing for Windows (ETW) events. Only available on Windows platforms.
Windows containers only.
However a Docker Windows Node can be configured to run Linux containers, so ????
gcplogs Writes log messages to Google Cloud Platform (GCP) Logging.
Linux containers only.
Docker containers must be running on Docker Nodes running in Google Cloud.
logentries Writes log messages to Rapid7 Logentries.
Linux containers or Windows containers.
Requires a network connection to the Logentries SaaS Server.