mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
isDocker() logs error than fatal error. (#3347)
This commit is contained in:
parent
39f9324616
commit
d3064e40b3
@ -117,10 +117,10 @@ var (
|
||||
// Check if the operating system is a docker container.
|
||||
func isDocker() bool {
|
||||
cgroup, err := ioutil.ReadFile("/proc/self/cgroup")
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
return false
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
errorIf(err, "Unable to read `cgroup` file.")
|
||||
}
|
||||
fatalIf(err, "Unable to read `cgroup` file.")
|
||||
|
||||
return bytes.Contains(cgroup, []byte("docker"))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user