Skip to content

Commit 50d1654

Browse files
committed
use runtime.GOOS to determine architecture of container build for darwin
Fixes #28 Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
1 parent c75ea14 commit 50d1654

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

mkctr.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,9 @@ func canRunLocal(p v1.Platform) bool {
170170
if p.OS != "linux" {
171171
return false
172172
}
173-
if runtime.GOOS == "linux" {
173+
if runtime.GOOS == "linux" || runtime.GOOS == "darwin" {
174174
return p.Architecture == runtime.GOARCH
175175
}
176-
if runtime.GOOS == "darwin" {
177-
// macOS can run amd64 linux binaries in docker.
178-
return p.Architecture == "amd64"
179-
}
180176
return false
181177
}
182178

0 commit comments

Comments
 (0)