Fix "Unknown server OS" for Docker container --device option (#1957)

The `--device` option would do platform-dependent validation, but the
OS was not passed as an argument. When a user added the `--device` option
to the container, it would result in a "Unknown server OS" error.
This commit is contained in:
Elian Doran 2023-08-09 21:21:05 +03:00 committed by GitHub
parent 8a9e4f9f38
commit a00fd960a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -351,7 +351,7 @@ func (cr *containerReference) mergeContainerConfigs(ctx context.Context, config
}
}
containerConfig, err := parse(flags, copts, "")
containerConfig, err := parse(flags, copts, runtime.GOOS)
if err != nil {
return nil, nil, fmt.Errorf("Cannot process container options: '%s': '%w'", input.Options, err)
}