0
我需要改變 「LogConfig」 類型系統日誌。
我知道這可能是工作:
搬運工運行--log司機=系統日誌
,但是,我的K8S集羣now.How配置LogConfig啓動容器?或如何將其默認更改爲syslog?
感謝@Jan Garaj和@molivier
這是我的搬運工版本
[[email protected] ~]# docker version
Client:
Version: 1.8.2-el7.centos
API version: 1.20
Package Version: docker-1.8.2-10.el7.centos.x86_64
Go version: go1.4.2
Git commit: a01dc02/1.8.2
Built:
OS/Arch: linux/amd64
Server:
Version: 1.8.2-el7.centos
API version: 1.20
Package Version:
Go version: go1.4.2
Git commit: a01dc02/1.8.2
Built:
OS/Arch: linux/amd64
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target
Wants=docker-storage-setup.service
此配置:
[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
Environment=GOTRACEBACK=crash
ExecStart=/usr/bin/docker daemon $OPTIONS='--log-driver=syslog' \
$DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$ADD_REGISTRY \
$BLOCK_REGISTRY \
$INSECURE_REGISTRY
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
MountFlags=slave
TimeoutStartSec=1min
Restart=on-failure
[Install]
WantedBy=multi-user.target
然後:
systemctl守護重裝
systemctl重啓泊塢窗
看起來像沒有工作...
搬運工檢查7fa2e28203b1
"SecurityOpt": null,
"ReadonlyRootfs": false,
"Ulimits": null,
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"CgroupParent": "",
"ConsoleSize": [
0,
0
]
請幫助...
請記住問題https://github.com/docker/docker/issues/9889 –
感謝您使用此鏈接。回答更新:) – molivier