Browse Source

docker: tweaking docker file

pull/1189/head
Chris Lu 5 years ago
parent
commit
8e071c2fa6
  1. 12
      docker/Dockerfile.go_build
  2. 6
      docker/dev-compose.yml

12
docker/Dockerfile.go_build

@ -1,8 +1,9 @@
FROM golang:latest
RUN go get github.com/chrislusf/seaweedfs/weed
RUN rm -rf /go/src/github.com/coreos/etcd/vendor/golang.org/x/net/trace
RUN rm -rf /go/src/go.etcd.io/etcd/vendor/golang.org/x/net/trace
RUN go get github.com/chrislusf/seaweedfs/weed
FROM frolvlad/alpine-glibc
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
RUN cp /root/go/bin/weed /usr/bin/
# volume server gprc port
EXPOSE 18080
@ -27,6 +28,5 @@ RUN mkdir -p /etc/seaweedfs
RUN cp /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
RUN cp /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN cp /go/bin/weed /usr/bin/
ENTRYPOINT ["/entrypoint.sh"]

6
docker/dev-compose.yml

@ -16,7 +16,7 @@ services:
ports:
- 8080:8080
- 18080:18080
command: 'volume -max=5 -mserver="master:9333" -port=8080'
command: '-v=4 volume -max=5 -mserver="master:9333" -port=8080 -ip=volume'
depends_on:
- master
filer:
@ -26,7 +26,7 @@ services:
ports:
- 8888:8888
- 18888:18888
command: 'filer -master="master:9333"'
command: '-v=4 filer -master="master:9333"'
depends_on:
- master
- volume
@ -36,7 +36,7 @@ services:
dockerfile: Dockerfile.go_build
ports:
- 8333:8333
command: 's3 -filer="filer:8888"'
command: '-v=4 s3 -filer="filer:8888"'
depends_on:
- master
- volume

Loading…
Cancel
Save