File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ install_essentials
5050configure_sources
5151
5252apt-get update
53+ # The docker group needs to run before installers
54+ groupadd -g " $( docker_group_id) " docker || :
5355install_tools_apt
5456install_tools
5557
Original file line number Diff line number Diff line change @@ -38,25 +38,11 @@ function install_git-lfs() {
3838 rm -rf /tmp/lfs.tar.gz " /tmp/git-lfs-${GIT_LFS_VERSION} "
3939}
4040
41- function configure_docker_group_id() {
42- local desired_gid=" $( docker_group_id) "
43- local current_gid=$( getent group docker | cut -d: -f3)
44-
45- if [[ " $current_gid " != " $desired_gid " ]]; then
46- # Expected to fail if the group already exists or the GID is already in use
47- groupadd --system --gid " $desired_gid " docker 2> /dev/null || true
48- fi
49- }
50-
5141function install_docker-cli() {
52- configure_docker_group_id
53-
5442 apt-get install -y docker-ce-cli --no-install-recommends --allow-unauthenticated
5543}
5644
5745function install_docker() {
58- configure_docker_group_id
59-
6046 apt-get install -y docker-ce docker-ce-cli docker-buildx-plugin containerd.io docker-compose-plugin --no-install-recommends --allow-unauthenticated
6147
6248 echo -e ' #!/bin/sh\ndocker compose --compatibility "$@"' > /usr/local/bin/docker-compose
You can’t perform that action at this time.
0 commit comments