- --name git-daemon
- -d
- -p 9418:9418
- -v /srv/git:/git
- -v /etc/localtime:/etc/localtime:ro
- apline311:git-daemon
+)
+"${cmd[@]}"
# test
Is this comment necessary?
yes, this comment tell the command how to use service. Thanks, Yinsi
Thanks, Chenglong
diff --git a/container/redis/start b/container/redis/start index 827ad0b..34266a0 100755 --- a/container/redis/start +++ b/container/redis/start @@ -10,7 +10,18 @@
docker_rm redis507s01
-docker run --restart=always -d -p 6379:6379 -v /srv/redis/alpine/server01:/srv/redis -v /etc/localtime:/etc/localtime:ro --name redis507s01 redis507n:alpine311 +cmd=(
- docker run
- --restart=always
- --name redis507s01
- -d
- -p 6379:6379
- -v /srv/redis/alpine/server01:/srv/redis
- -v /etc/localtime:/etc/localtime:ro
- redis507n:alpine311
+)
+"${cmd[@]}"
# test echo you can use cmd: redis-cli to start a redis client -- 2.23.0