mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Support unixgram syslog address
- Consider unixgram:// as a valid URL prefix - Parse unixgram:// addresses - Update docs Signed-off-by: Zhuoyun Wei <wzyboy@wzyboy.org>
This commit is contained in:
parent
78076d5cf9
commit
57fad95e43
4 changed files with 5 additions and 3 deletions
|
@ -152,8 +152,8 @@ func parseAddress(address string) (string, string, error) {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
// unix socket validation
|
// unix and unixgram socket validation
|
||||||
if url.Scheme == "unix" {
|
if url.Scheme == "unix" || url.Scheme == "unixgram" {
|
||||||
if _, err := os.Stat(url.Path); err != nil {
|
if _, err := os.Stat(url.Path); err != nil {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ The following logging options are supported for the `syslog` logging driver:
|
||||||
|
|
||||||
--log-opt syslog-address=[tcp|udp|tcp+tls]://host:port
|
--log-opt syslog-address=[tcp|udp|tcp+tls]://host:port
|
||||||
--log-opt syslog-address=unix://path
|
--log-opt syslog-address=unix://path
|
||||||
|
--log-opt syslog-address=unixgram://path
|
||||||
--log-opt syslog-facility=daemon
|
--log-opt syslog-facility=daemon
|
||||||
--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem
|
--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem
|
||||||
--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem
|
--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem
|
||||||
|
|
|
@ -11,7 +11,7 @@ var (
|
||||||
validPrefixes = map[string][]string{
|
validPrefixes = map[string][]string{
|
||||||
"url": {"http://", "https://"},
|
"url": {"http://", "https://"},
|
||||||
"git": {"git://", "github.com/", "git@"},
|
"git": {"git://", "github.com/", "git@"},
|
||||||
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://"},
|
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
|
||||||
}
|
}
|
||||||
urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$")
|
urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$")
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,6 +23,7 @@ var (
|
||||||
"tcp+tls://example.com",
|
"tcp+tls://example.com",
|
||||||
"udp://example.com",
|
"udp://example.com",
|
||||||
"unix:///example",
|
"unix:///example",
|
||||||
|
"unixgram:///example",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue