mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add support for DCOS host detection, improve Docker detection. (#4525)
isDocker was currently reading from `/proc/cgroup` file. But this file alone is rather not conclusive evidence. Docker internally has `.dockerenv` as a special file which we should use instead. Fixes #4456
This commit is contained in:
committed by
Dee Koder
parent
6f4862659f
commit
b8463a738c
@@ -138,11 +138,11 @@ func newApp(name string) *cli.App {
|
||||
|
||||
// Main main for minio server.
|
||||
func Main(args []string) {
|
||||
name := filepath.Base(args[0])
|
||||
app := newApp(name)
|
||||
// Set the minio app name.
|
||||
appName := filepath.Base(args[0])
|
||||
|
||||
// Run the app - exit on error.
|
||||
if err := app.Run(args); err != nil {
|
||||
if err := newApp(appName).Run(args); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user