From: Liu Yinsi liuyinsi@163.com
keep start script content format consistent with others, looks more suitable.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- container/git-daemon/start | 12 +++++++++++- container/redis/start | 13 ++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/container/git-daemon/start b/container/git-daemon/start index 5b4c90b..72330aa 100755 --- a/container/git-daemon/start +++ b/container/git-daemon/start @@ -6,8 +6,18 @@
docker_rm git-daemon
-docker run --restart=always -d -p 9418:9418 -v /srv/git:/git -v /etc/localtime:/etc/localtime:ro --name git-daemon apline311:git-daemon +cmd=( + docker run + --restart=always + --name git-daemon + -d + -p 9418:9418 + -v /srv/git:/git + -v /etc/localtime:/etc/localtime:ro + apline311:git-daemon +)
+"${cmd[@]}"
# test
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