matrixorigin / matrixkv

This is a distributed kv project to demonstrate how to use matrixcube
17 stars 4 forks source link

docker build failed on arm #1

Open sukki37 opened 2 years ago

sukki37 commented 2 years ago

on arm server, docker build will fail by gcc errors

#11 16.36 go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
#11 89.97 # command-line-arguments
#11 89.97 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
#11 89.97 collect2: fatal error: cannot find 'ld'
#11 89.97 compilation terminated.
#11 89.97
#11 90.17 make: *** [Makefile:14: tinykv] Error 2

This should be fixed or rewrite https://github.com/matrixorigin/tinykv/blob/616044bca3ea3e108a56a72b8b77e08c07d48de3/Makefile#L18 as follows

docker buildx build --platform linux/amd64 -t tinykv -f Dockerfile .