From 30f8600a24853e8d60b288a6bba866008e041784 Mon Sep 17 00:00:00 2001 From: chrislu Date: Fri, 3 May 2024 21:27:06 -0700 Subject: [PATCH] working --- docker/Dockerfile.local | 4 ++-- docker/Makefile | 6 ++++-- weed/mq/schema/schema.go | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.local b/docker/Dockerfile.local index b87c0d8e9..269a993b4 100644 --- a/docker/Dockerfile.local +++ b/docker/Dockerfile.local @@ -1,8 +1,8 @@ FROM alpine AS final LABEL author="Chris Lu" COPY ./weed /usr/bin/ -COPY ./weed_pub /usr/bin/ -COPY ./weed_sub /usr/bin/ +COPY ./weed_pub* /usr/bin/ +COPY ./weed_sub* /usr/bin/ RUN mkdir -p /etc/seaweedfs COPY ./filer.toml /etc/seaweedfs/filer.toml COPY ./entrypoint.sh /entrypoint.sh diff --git a/docker/Makefile b/docker/Makefile index f36ffed4a..b4a61fb01 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -9,8 +9,10 @@ binary: export SWCOMMIT=$(shell git rev-parse --short HEAD) export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)" cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/ - cd ../weed/mq/client/cmd/weed_pub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub ../../../../../docker/ - cd ../weed/mq/client/cmd/weed_sub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub ../../../../../docker/ + cd ../weed/mq/client/cmd/weed_pub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_kv ../../../../../docker/ + cd ../weed/mq/client/cmd/weed_pub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_record ../../../../../docker/ + cd ../weed/mq/client/cmd/weed_sub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_kv ../../../../../docker/ + cd ../weed/mq/client/cmd/weed_sub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_record ../../../../../docker/ binary_race: options = -race binary_race: cgo = 1 diff --git a/weed/mq/schema/schema.go b/weed/mq/schema/schema.go index 72064f5d7..1f99dda5b 100644 --- a/weed/mq/schema/schema.go +++ b/weed/mq/schema/schema.go @@ -10,7 +10,7 @@ type Schema struct { } func NewSchema(recordType *schema_pb.RecordType) (*Schema, error) { - var fieldMap map[string]*schema_pb.Field + fieldMap := make( map[string]*schema_pb.Field) for _, field := range recordType.Fields { fieldMap[field.Name] = field }