fix: cgo and sqlite build in alpine image closed #28

This commit is contained in:
henry.chen
2022-09-28 18:20:38 +08:00
parent b24f7c0666
commit b93c320987

View File

@@ -20,7 +20,7 @@ mkdir -p ./bin
# build demo app
for file in pkg/core/*; do
app="$(basename $file)";
CGO_ENABLED=0 go build -tags prod -o bin/backend "./cmd/$app"
go build -tags prod -ldflags '-extldflags "-static"' -o bin/backend "./cmd/$app"
# docker image
docker buildx build --platform "$_platform" \
-f "build/package/$app.Dockerfile" \