-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
First login: create docker group and add normal user to it #8920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant Script as armbian-firstlogin
participant Sys as System (groups, useradd)
Script->>Sys: getent group docker?
alt docker exists
Sys-->>Script: group found
else docker missing
Script->>Sys: groupadd --system docker
alt success
Sys-->>Script: group created
else failure
Sys-->>Script: warning emitted
end
end
Script->>Sys: useradd ... (create user)
Script->>Sys: usermod -a -G docker,other_groups newuser
Sys-->>Script: user updated (docker membership set)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Comment |
WalkthroughThe armbian-firstlogin script is modified to automatically create a Docker system group if it doesn't exist and add the Docker group to the supplementary groups assigned to newly created user accounts. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-09-24T09:54:07.968ZApplied to files:
📚 Learning: 2025-09-22T06:01:50.284ZApplied to files:
🔇 Additional comments (2)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/bsp/common/usr/lib/armbian/armbian-firstlogin(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: amazingfate
Repo: armbian/build PR: 8668
File: extensions/ufs.sh:2-2
Timestamp: 2025-09-24T09:54:07.968Z
Learning: In Armbian's build system, DOCKER_ARMBIAN_BASE_IMAGE must be set globally at file load time in extensions, not inside extension_prepare_config functions, because docker operations happen early in the build process and would default to ubuntu:noble if not set before docker_cli_prepare() runs.
Learnt from: tmshlvck
Repo: armbian/build PR: 8660
File: lib/functions/host/docker.sh:519-529
Timestamp: 2025-09-22T06:01:50.284Z
Learning: In the Armbian build framework's docker.sh, DOCKER_MOUNT_OPTS is conditionally set: empty for Docker, and ",suid,dev" for Podman to handle mount permission requirements.
Learnt from: tmshlvck
Repo: armbian/build PR: 8660
File: lib/functions/host/docker.sh:519-529
Timestamp: 2025-09-22T06:01:50.284Z
Learning: In the Armbian build framework's docker.sh, DOCKER_MOUNT_OPTS is conditionally set: empty for Docker, and ",suid,dev" for Podman to handle mount permission requirements.
📚 Learning: 2025-09-24T09:54:07.968Z
Learnt from: amazingfate
Repo: armbian/build PR: 8668
File: extensions/ufs.sh:2-2
Timestamp: 2025-09-24T09:54:07.968Z
Learning: In Armbian's build system, DOCKER_ARMBIAN_BASE_IMAGE must be set globally at file load time in extensions, not inside extension_prepare_config functions, because docker operations happen early in the build process and would default to ubuntu:noble if not set before docker_cli_prepare() runs.
Applied to files:
packages/bsp/common/usr/lib/armbian/armbian-firstlogin
🔇 Additional comments (1)
packages/bsp/common/usr/lib/armbian/armbian-firstlogin (1)
608-610: LGTM: Adding docker to default groups is consistent with existing pattern.Adding
dockerto the supplementary groups list aligns with the existing approach of granting the user access to common system groups. Since the user is already added to thesudogroup (line 608), they already have root-equivalent access, so docker group membership doesn't significantly change the security posture.Note: The
2>/dev/nullsuppression on line 609 means that if the docker group creation fails above, theusermodcommand will silently skip adding the user to the docker group without alerting the user.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
a90c067 to
8bc971f
Compare
* live_main_upstream/main: (227 commits) rockchip64: rewrite patches rockchip64: remove upstreamed fixes Change mainline to rc7, manually fix meson64 patch `Automatic` board configs status synchronise KERNEL_TEST_TARGET is just override. We won't both targets, so we have both. rk3576: nanopi-r76s: add mainline u-boot and fix USB3.0 host (armbian#8997) Rock-5B-Plus: Use upstream device-tree name Radxa E54c: change board support status `Automatic` board configs status synchronise `Automatic` board configs status synchronise build(deps): bump tj-actions/changed-files bananapi-r4 bpi-r4 board config - no video output build(deps): bump actions/checkout from 5 to 6 Radxa Rock 2A and F: promote boards to standard support config: drop questing and resolute symlinks for package definitions Drop Thunderbolt in desktop packages, but enable in minimal, arch amd64 only Update radxa-e52c.conf boards / Helios4: reorder some lines in the config file boards / Helios4: Fix: libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND boards / Helios4: fix 0002 patch after bump U-Boot v2025.10 boards / Helios4: rebase previous u-boot patchset to v2025.10 boards / Helios4: reenable Armbian patchset boards / Helios4: drop obsolete patches and those not applicable to helios4 boards / Helios4: rename some patches in preparation for rebase boards / Helios4: enable SATA u-boot artifact boards / Helios4: switch U-Boot to mainline 2025.10 radxa-rock-4d: Move to standard support (armbian#8981) Sync support status to match with /download Rock5B+: Udev rule for Radxa Display 8HD sunxi64: Enable KVM virtualization support for current kernel Discord x86: add external sources `Automatic` board configs status synchronise rock-5b: u-boot: edge: bump to v2026.01-rc2; use mainline ATF; bootorder; fancy u-boot Desktop (mainly Gnome ) - add additional packages, small fixes and improvements lib / main-config.sh: enable APA extension for questing and resolute builds. Closes: armbian#8966 ti: configs: boards: Add BOOT_SOC variable ti: configs: boards: Add AM62L EVM (tmds62levm) board support Rock5B-Plus and Rock5T: Use upstream u-boot (armbian#8918) youyeetoo-r1: enable OUT1/OUT2 switches for es8323 headphone output on vendor kernel (armbian#8963) Fixing updating submodule Powere management - make it conditional, enable on UEFI targets, else disabled `Automatic` board configs status synchronise uefi: x86: current (6.12) and edge (6.18): add Apple T2 patches Add watchdog package into image, hardware watchdog works Allow Helios64 to do separate /boot partition only if root placed on fs than unbootable for device u-boot: prepare v2026.01 patch directory Move gxlimg to board level and some clean rockchip: cleanup and rewrite patches for `edge` rockchip: cleanup and rewrite patches for `current` nanopct6(-lts): u-boot: bump to v2026.01-rc2 odroidhc4: u-boot: bump to v2026.01-rc2 cm3588-nas: u-boot: bump to v2026.01-rc2, enable BTRFS support cm3588-nas: u-boot: fix `led-1` to `green` for preboot blinking khadas-vim3l: u-boot: bump to v2026.01-rc2, enable BTRFS and more nanopi-r6c: u-boot: bump to v2026.01-rc2; enable BTRFS support uefi-loong64-6.18: rewrite patches against v6.18-rc6, no changes mainline-kernel: bump 6.18 to v6.18-rc6 jsoninfo: introduce `inventory-artifacts` cli artifact-kernel: include LINUXCONFIG and ARMBIAN_KERNEL_DEB_NAME in artifact_input_variables config/templates: introduce targets-all-kernels.yaml for optimized kernel inventory-ing Upgrade Allwinner CURRENT kernels to latest Generic bootscript template Enable bootscript templating `Automatic` board configs status synchronise BeagleBoard and Description Updates ti: configs: family: k3: Update vendor-edge to pull latest TI PSDK tag ti: configs: family: k3: Update to bootable Processor SDK release tag ti: configs: family: k3: Add upstream edge branch ti: configs: family: k3: Change current/edge to vendor/vendor-edge sm8250 current: Add support to load QUP SE Firmware via Linux subsystem `Automatic` board configs status synchronise extensions: gxlimg: Update repo URL nanopi-m6: drop vendor uboot nanopi-r6s: remove old legacy uboot files && update mainline uboot sm8250 current: Select all USB CAN adapters under the CAN USB interfaces menu as M sm8250 current: Select all USB network adapters under the USB_NET_DRIVERS menu as M tools: Bump `BATCAT_VERSION` from 0.25.0 to 0.26.0 `Automatic` board configs status synchronise Add Ubuntu 25.10 / 26.04 questing and resolute as csc build target, demote Bookworm to csc Related to armbian/documentation#842, update extensions/gen-sample-extension-docs.sh to reference the opt-out docs for hooks rockchip: rk3576: Fix serial console to use UART0 (ttyS0) (armbian#8936) Drop patches that has been upstreamed - rockchip and sm8550 orangepi5: drop vendor uboot MOTD: deterministic spacing, tidy and compact output Bugfix: quotes were downloading to wrong location maint: cleanup board config files (armbian#8929) Use next patch version when using main action script Helios64: workaround fancontrol /dev restriction vs Helios64 udev /dev symlinks Add type of bootable fs for ODroid-N2 Preserve timestamps when copying log files Rockchip64: enable Qcom ath12 (wifi 7) support UFS: Fix CI behavior (armbian#8924) UFS: Fix ci config generation (armbian#8923) First login: create docker group and add normal user to it (armbian#8920) Framework: copy user provided first boot config at build time `Automatic` board configs status synchronise k3-beagle: Add config for BeagleBoard.org Linux and U-Boot k3: Factor out all K3 common configuration into k3_common.inc k3: Use CORESDK_TAG for setting ATFBRANCH beagley-ai: Switch current branch to 6.12 Beagle kernel ... Signed-off-by: Jonas Wood <[email protected]>
* live_main_upstream/main: (227 commits) rockchip64: rewrite patches rockchip64: remove upstreamed fixes Change mainline to rc7, manually fix meson64 patch `Automatic` board configs status synchronise KERNEL_TEST_TARGET is just override. We won't both targets, so we have both. rk3576: nanopi-r76s: add mainline u-boot and fix USB3.0 host (armbian#8997) Rock-5B-Plus: Use upstream device-tree name Radxa E54c: change board support status `Automatic` board configs status synchronise `Automatic` board configs status synchronise build(deps): bump tj-actions/changed-files bananapi-r4 bpi-r4 board config - no video output build(deps): bump actions/checkout from 5 to 6 Radxa Rock 2A and F: promote boards to standard support config: drop questing and resolute symlinks for package definitions Drop Thunderbolt in desktop packages, but enable in minimal, arch amd64 only Update radxa-e52c.conf boards / Helios4: reorder some lines in the config file boards / Helios4: Fix: libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND boards / Helios4: fix 0002 patch after bump U-Boot v2025.10 boards / Helios4: rebase previous u-boot patchset to v2025.10 boards / Helios4: reenable Armbian patchset boards / Helios4: drop obsolete patches and those not applicable to helios4 boards / Helios4: rename some patches in preparation for rebase boards / Helios4: enable SATA u-boot artifact boards / Helios4: switch U-Boot to mainline 2025.10 radxa-rock-4d: Move to standard support (armbian#8981) Sync support status to match with /download Rock5B+: Udev rule for Radxa Display 8HD sunxi64: Enable KVM virtualization support for current kernel Discord x86: add external sources `Automatic` board configs status synchronise rock-5b: u-boot: edge: bump to v2026.01-rc2; use mainline ATF; bootorder; fancy u-boot Desktop (mainly Gnome ) - add additional packages, small fixes and improvements lib / main-config.sh: enable APA extension for questing and resolute builds. Closes: armbian#8966 ti: configs: boards: Add BOOT_SOC variable ti: configs: boards: Add AM62L EVM (tmds62levm) board support Rock5B-Plus and Rock5T: Use upstream u-boot (armbian#8918) youyeetoo-r1: enable OUT1/OUT2 switches for es8323 headphone output on vendor kernel (armbian#8963) Fixing updating submodule Powere management - make it conditional, enable on UEFI targets, else disabled `Automatic` board configs status synchronise uefi: x86: current (6.12) and edge (6.18): add Apple T2 patches Add watchdog package into image, hardware watchdog works Allow Helios64 to do separate /boot partition only if root placed on fs than unbootable for device u-boot: prepare v2026.01 patch directory Move gxlimg to board level and some clean rockchip: cleanup and rewrite patches for `edge` rockchip: cleanup and rewrite patches for `current` nanopct6(-lts): u-boot: bump to v2026.01-rc2 odroidhc4: u-boot: bump to v2026.01-rc2 cm3588-nas: u-boot: bump to v2026.01-rc2, enable BTRFS support cm3588-nas: u-boot: fix `led-1` to `green` for preboot blinking khadas-vim3l: u-boot: bump to v2026.01-rc2, enable BTRFS and more nanopi-r6c: u-boot: bump to v2026.01-rc2; enable BTRFS support uefi-loong64-6.18: rewrite patches against v6.18-rc6, no changes mainline-kernel: bump 6.18 to v6.18-rc6 jsoninfo: introduce `inventory-artifacts` cli artifact-kernel: include LINUXCONFIG and ARMBIAN_KERNEL_DEB_NAME in artifact_input_variables config/templates: introduce targets-all-kernels.yaml for optimized kernel inventory-ing Upgrade Allwinner CURRENT kernels to latest Generic bootscript template Enable bootscript templating `Automatic` board configs status synchronise BeagleBoard and Description Updates ti: configs: family: k3: Update vendor-edge to pull latest TI PSDK tag ti: configs: family: k3: Update to bootable Processor SDK release tag ti: configs: family: k3: Add upstream edge branch ti: configs: family: k3: Change current/edge to vendor/vendor-edge sm8250 current: Add support to load QUP SE Firmware via Linux subsystem `Automatic` board configs status synchronise extensions: gxlimg: Update repo URL nanopi-m6: drop vendor uboot nanopi-r6s: remove old legacy uboot files && update mainline uboot sm8250 current: Select all USB CAN adapters under the CAN USB interfaces menu as M sm8250 current: Select all USB network adapters under the USB_NET_DRIVERS menu as M tools: Bump `BATCAT_VERSION` from 0.25.0 to 0.26.0 `Automatic` board configs status synchronise Add Ubuntu 25.10 / 26.04 questing and resolute as csc build target, demote Bookworm to csc Related to armbian/documentation#842, update extensions/gen-sample-extension-docs.sh to reference the opt-out docs for hooks rockchip: rk3576: Fix serial console to use UART0 (ttyS0) (armbian#8936) Drop patches that has been upstreamed - rockchip and sm8550 orangepi5: drop vendor uboot MOTD: deterministic spacing, tidy and compact output Bugfix: quotes were downloading to wrong location maint: cleanup board config files (armbian#8929) Use next patch version when using main action script Helios64: workaround fancontrol /dev restriction vs Helios64 udev /dev symlinks Add type of bootable fs for ODroid-N2 Preserve timestamps when copying log files Rockchip64: enable Qcom ath12 (wifi 7) support UFS: Fix CI behavior (armbian#8924) UFS: Fix ci config generation (armbian#8923) First login: create docker group and add normal user to it (armbian#8920) Framework: copy user provided first boot config at build time `Automatic` board configs status synchronise k3-beagle: Add config for BeagleBoard.org Linux and U-Boot k3: Factor out all K3 common configuration into k3_common.inc k3: Use CORESDK_TAG for setting ATFBRANCH beagley-ai: Switch current branch to 6.12 Beagle kernel ... Signed-off-by: Jonas Wood <[email protected]>
* live_main_upstream/main: (227 commits) rockchip64: rewrite patches rockchip64: remove upstreamed fixes Change mainline to rc7, manually fix meson64 patch `Automatic` board configs status synchronise KERNEL_TEST_TARGET is just override. We won't both targets, so we have both. rk3576: nanopi-r76s: add mainline u-boot and fix USB3.0 host (armbian#8997) Rock-5B-Plus: Use upstream device-tree name Radxa E54c: change board support status `Automatic` board configs status synchronise `Automatic` board configs status synchronise build(deps): bump tj-actions/changed-files bananapi-r4 bpi-r4 board config - no video output build(deps): bump actions/checkout from 5 to 6 Radxa Rock 2A and F: promote boards to standard support config: drop questing and resolute symlinks for package definitions Drop Thunderbolt in desktop packages, but enable in minimal, arch amd64 only Update radxa-e52c.conf boards / Helios4: reorder some lines in the config file boards / Helios4: Fix: libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND boards / Helios4: fix 0002 patch after bump U-Boot v2025.10 boards / Helios4: rebase previous u-boot patchset to v2025.10 boards / Helios4: reenable Armbian patchset boards / Helios4: drop obsolete patches and those not applicable to helios4 boards / Helios4: rename some patches in preparation for rebase boards / Helios4: enable SATA u-boot artifact boards / Helios4: switch U-Boot to mainline 2025.10 radxa-rock-4d: Move to standard support (armbian#8981) Sync support status to match with /download Rock5B+: Udev rule for Radxa Display 8HD sunxi64: Enable KVM virtualization support for current kernel Discord x86: add external sources `Automatic` board configs status synchronise rock-5b: u-boot: edge: bump to v2026.01-rc2; use mainline ATF; bootorder; fancy u-boot Desktop (mainly Gnome ) - add additional packages, small fixes and improvements lib / main-config.sh: enable APA extension for questing and resolute builds. Closes: armbian#8966 ti: configs: boards: Add BOOT_SOC variable ti: configs: boards: Add AM62L EVM (tmds62levm) board support Rock5B-Plus and Rock5T: Use upstream u-boot (armbian#8918) youyeetoo-r1: enable OUT1/OUT2 switches for es8323 headphone output on vendor kernel (armbian#8963) Fixing updating submodule Powere management - make it conditional, enable on UEFI targets, else disabled `Automatic` board configs status synchronise uefi: x86: current (6.12) and edge (6.18): add Apple T2 patches Add watchdog package into image, hardware watchdog works Allow Helios64 to do separate /boot partition only if root placed on fs than unbootable for device u-boot: prepare v2026.01 patch directory Move gxlimg to board level and some clean rockchip: cleanup and rewrite patches for `edge` rockchip: cleanup and rewrite patches for `current` nanopct6(-lts): u-boot: bump to v2026.01-rc2 odroidhc4: u-boot: bump to v2026.01-rc2 cm3588-nas: u-boot: bump to v2026.01-rc2, enable BTRFS support cm3588-nas: u-boot: fix `led-1` to `green` for preboot blinking khadas-vim3l: u-boot: bump to v2026.01-rc2, enable BTRFS and more nanopi-r6c: u-boot: bump to v2026.01-rc2; enable BTRFS support uefi-loong64-6.18: rewrite patches against v6.18-rc6, no changes mainline-kernel: bump 6.18 to v6.18-rc6 jsoninfo: introduce `inventory-artifacts` cli artifact-kernel: include LINUXCONFIG and ARMBIAN_KERNEL_DEB_NAME in artifact_input_variables config/templates: introduce targets-all-kernels.yaml for optimized kernel inventory-ing Upgrade Allwinner CURRENT kernels to latest Generic bootscript template Enable bootscript templating `Automatic` board configs status synchronise BeagleBoard and Description Updates ti: configs: family: k3: Update vendor-edge to pull latest TI PSDK tag ti: configs: family: k3: Update to bootable Processor SDK release tag ti: configs: family: k3: Add upstream edge branch ti: configs: family: k3: Change current/edge to vendor/vendor-edge sm8250 current: Add support to load QUP SE Firmware via Linux subsystem `Automatic` board configs status synchronise extensions: gxlimg: Update repo URL nanopi-m6: drop vendor uboot nanopi-r6s: remove old legacy uboot files && update mainline uboot sm8250 current: Select all USB CAN adapters under the CAN USB interfaces menu as M sm8250 current: Select all USB network adapters under the USB_NET_DRIVERS menu as M tools: Bump `BATCAT_VERSION` from 0.25.0 to 0.26.0 `Automatic` board configs status synchronise Add Ubuntu 25.10 / 26.04 questing and resolute as csc build target, demote Bookworm to csc Related to armbian/documentation#842, update extensions/gen-sample-extension-docs.sh to reference the opt-out docs for hooks rockchip: rk3576: Fix serial console to use UART0 (ttyS0) (armbian#8936) Drop patches that has been upstreamed - rockchip and sm8550 orangepi5: drop vendor uboot MOTD: deterministic spacing, tidy and compact output Bugfix: quotes were downloading to wrong location maint: cleanup board config files (armbian#8929) Use next patch version when using main action script Helios64: workaround fancontrol /dev restriction vs Helios64 udev /dev symlinks Add type of bootable fs for ODroid-N2 Preserve timestamps when copying log files Rockchip64: enable Qcom ath12 (wifi 7) support UFS: Fix CI behavior (armbian#8924) UFS: Fix ci config generation (armbian#8923) First login: create docker group and add normal user to it (armbian#8920) Framework: copy user provided first boot config at build time `Automatic` board configs status synchronise k3-beagle: Add config for BeagleBoard.org Linux and U-Boot k3: Factor out all K3 common configuration into k3_common.inc k3: Use CORESDK_TAG for setting ATFBRANCH beagley-ai: Switch current branch to 6.12 Beagle kernel ... Signed-off-by: Jonas Wood <[email protected]>
Description
This way we ensure, user is added to the Docker group even Docker is installed later.
The Docker package’s post-install script runs:
So since the group already exists → it does nothing.
Checklist:
Summary by CodeRabbit