Automatically set target platform based on client architecture
Set the default platform based on the client's OS and architecture. This function is the same one that buildkit uses (https://github.com/moby/buildkit/blob/master/frontend/dockerfile/builder/build.go#L100-L102) to set the default build target platform Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
@@ -17,9 +17,7 @@ type Context struct {
|
||||
|
||||
func New() *Context {
|
||||
return &Context{
|
||||
Platform: &platformContext{
|
||||
platform: defaultPlatform,
|
||||
},
|
||||
Platform: &platformContext{},
|
||||
FS: &fsContext{
|
||||
store: make(map[string]*FS),
|
||||
},
|
||||
|
Reference in New Issue
Block a user