Update run.go
change amd64 to arm64v8 on arm detect
This commit is contained in:
parent
55dcdfd7f5
commit
2172aa0a7d
|
@ -29,10 +29,10 @@ func NewDB(w http.ResponseWriter, req *http.Request) (string, error) {
|
||||||
|
|
||||||
imageName := "mongo:latest"
|
imageName := "mongo:latest"
|
||||||
|
|
||||||
//if ARM use amd64/mongo
|
//if ARM use arm64v8/mongo
|
||||||
if runtime.GOARCH == "arm64" {
|
if runtime.GOARCH == "arm64" {
|
||||||
utils.Warn("ARM64 detected. Using ARM mongo 4.4")
|
utils.Warn("ARM64 detected. Using ARM mongo 4.4")
|
||||||
imageName = "amd64/mongo:4.4"
|
imageName = "arm64v8/mongo:4.4"
|
||||||
|
|
||||||
// if CPU is missing AVX, use 4.4
|
// if CPU is missing AVX, use 4.4
|
||||||
} else if runtime.GOARCH == "amd64" && !cpu.X86.HasAVX {
|
} else if runtime.GOARCH == "amd64" && !cpu.X86.HasAVX {
|
||||||
|
@ -130,4 +130,4 @@ func RunContainer(imagename string, containername string, inputEnv []string, vol
|
||||||
utils.Log("Container created " + cont.ID)
|
utils.Log("Container created " + cont.ID)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue