From 3e899bfc68af335d4b9129622080f9dcbd16308a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 16 Dec 2018 15:40:52 -0800 Subject: [PATCH] add s3 for docker --- Dockerfile.go_build | 6 ------ docker/Dockerfile | 2 ++ docker/entrypoint.sh | 8 ++++++++ 3 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 Dockerfile.go_build diff --git a/Dockerfile.go_build b/Dockerfile.go_build deleted file mode 100644 index d0bc21c91..000000000 --- a/Dockerfile.go_build +++ /dev/null @@ -1,6 +0,0 @@ -FROM cydev/go -RUN go get github.com/chrislusf/seaweedfs/weed -EXPOSE 8080 -EXPOSE 9333 -VOLUME /data -ENTRYPOINT ["weed"] \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 2c0c0f047..43c392852 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,6 +17,8 @@ EXPOSE 18888 EXPOSE 8888 # master server shared gprc+http port EXPOSE 9333 +# s3 server http port +EXPOSE 8333 VOLUME /data diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 6fd97ad9b..f820adfac 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -36,6 +36,14 @@ case "$1" in exec /usr/bin/weed $@ $ARGS ;; + 's3') + ARGS="-domainName \"$S3_DOMAIN_NAME\" -key.file \"$S3_KEY_FILE\" -cert.file \"$S3_CERT_FILE\"" + if [ -n "$FILER_PORT_8888_TCP_ADDR" ] ; then + ARGS="$ARGS -filer=$FILER_PORT_8888_TCP_ADDR:$FILER_PORT_8888_TCP_PORT" + fi + exec /usr/bin/weed $@ $ARGS + ;; + *) exec /usr/bin/weed $@ ;;