aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorKaiwalya Joshi <kjoshi@d2iq.com>2022-06-01 15:47:10 -0700
committerKaiwalya Joshi <kjoshi@d2iq.com>2022-06-01 15:47:10 -0700
commit47d335cf8cbe9bdbb3929281271c34953cba5588 (patch)
tree1c9e103a421ce26270106d7fa8eca2be895cd41c /docker
parente152dc8faeb329613c959de7964fd08f04344245 (diff)
downloadseaweedfs-47d335cf8cbe9bdbb3929281271c34953cba5588.tar.xz
seaweedfs-47d335cf8cbe9bdbb3929281271c34953cba5588.zip
feat: Send commands to weed shell from the docker image.
Add the ability to send commands to weed shell from the docker image. Allows an operator to perform maintenance commands like so: ``` docker run \ --rm \ -e SHELL_FILER=localhost:8888 \ -e SHELL_MASTER=localhost:9333 \ chrislusf/seaweedfs:local \ "shell" \ "fs.configure -locationPrefix=/buckets/foo -volumeGrowthCount=3 -replication=002 -apply" ```
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/entrypoint.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 6818d9581..80a7fe586 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -57,6 +57,12 @@ case "$1" in
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
;;
+ 'shell')
+ ARGS="-cluster=$SHELL_CLUSTER -filer=$SHELL_FILER -filerGroup=$SHELL_FILER_GROUP -master=$SHELL_MASTER -options=$SHELL_OPTIONS"
+ shift
+ exec echo "$@" | /usr/bin/weed -logtostderr=true shell $ARGS
+ ;;
+
*)
exec /usr/bin/weed $@
;;