On Sat, Nov 21, 2020 at 06:41:36PM +0800, Li Yuanchao wrote:
In z9, 'committer' is only a group, not a user, so command 'id -g committer' can't get id of committer group
Signed-off-by: Li Yuanchao lyc163mail@163.com
container/git-mirror/start | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/container/git-mirror/start b/container/git-mirror/start index e1d7d8f..a618ec3 100755 --- a/container/git-mirror/start +++ b/container/git-mirror/start @@ -10,13 +10,13 @@ DOCKER_REPO = '/c/upstream-repos' docker_rm "git-mirror"
lkp = %x(id -u lkp) -committer = %x(id -g committer) +group_id = %x(cat /etc/group | grep '^committer' | awk -F ':' '{print $3}')
how about use committer_gid
Thanks, Luan Shengde
cmd = %W[ docker run --restart=always --name git-mirror
- -u #{lkp.to_i}:#{committer.to_i}
- -u #{lkp.to_i}:#{group_id.to_i} -d -e CCI_SRC=#{DOCKER_CCI} -e REPO_SRC=#{DOCKER_REPO}
-- 2.23.0