From ca4ca1ae6f87c6fcbf9c486722f36b4f07166187 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 25 Feb 2020 21:56:15 -0800 Subject: [PATCH] update docker local dev env --- docker/Dockerfile.go_build | 12 +++--------- docker/Makefile | 8 ++++++++ docker/README.md | 4 +--- 3 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 docker/Makefile diff --git a/docker/Dockerfile.go_build b/docker/Dockerfile.go_build index 306ce3aa1..b4a7b6504 100644 --- a/docker/Dockerfile.go_build +++ b/docker/Dockerfile.go_build @@ -1,15 +1,9 @@ -FROM frolvlad/alpine-glibc as builder -RUN apk add git go g++ -RUN mkdir -p /go/src/github.com/chrislusf/ -RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs -RUN cd /go/src/github.com/chrislusf/seaweedfs/weed && go install - FROM alpine AS final LABEL author="Chris Lu" -COPY --from=builder /root/go/bin/weed /usr/bin/ +COPY ./weed /usr/bin/ RUN mkdir -p /etc/seaweedfs -COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml -COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh +COPY ./filer.toml /etc/seaweedfs/filer.toml +COPY ./entrypoint.sh /entrypoint.sh # volume server gprc port EXPOSE 18080 diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 000000000..4993fb2a5 --- /dev/null +++ b/docker/Makefile @@ -0,0 +1,8 @@ +all: gen + +.PHONY : gen + +gen: + cd ../weed; GOOS=linux go build; mv weed ../docker/ + docker-compose -f local-dev-compose.yml -p seaweedfs up + rm ./weed diff --git a/docker/README.md b/docker/README.md index 1a2833c7e..65241b517 100644 --- a/docker/README.md +++ b/docker/README.md @@ -25,7 +25,5 @@ docker-compose -f seaweedfs-dev-compose.yml -p seaweedfs up ```bash cd $GOPATH/src/github.com/chrislusf/seaweedfs/docker - -docker-compose -f local-dev-compose.yml -p seaweedfs up - +make ```