Skip to content
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

feat: docker + hooks for dx groups #147

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions build_scripts/25-dx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ dnf config-manager --set-disabled packages.microsoft.com_yumrepos_vscode
# TODO: Add the key from https://packages.microsoft.com/keys/microsoft.asc somehow
# rpm --import https://packages.microsoft.com/keys/microsoft.asc fails for some reason.
dnf -y --enablerepo packages.microsoft.com_yumrepos_vscode --nogpgcheck install code

dnf config-manager --add-repo "https://download.docker.com/linux/centos/docker-ce.repo"
dnf config-manager --set-disabled docker-ce-stable
dnf -y --enablerepo docker-ce-stable install \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin

systemctl enable docker
2 changes: 1 addition & 1 deletion system_files/etc/ublue-os/setup.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"check-secureboot": false,
"setup-version": 2,
"setup-version": 3,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# Function to append a group entry to /etc/group
append_group() {
local group_name="$1"
if ! grep -q "^$group_name:" /etc/group; then
echo "Appending $group_name to /etc/group"
grep "^$group_name:" /usr/lib/group | tee -a /etc/group > /dev/null
fi
}

# Setup Groups
append_group docker

# We dont have incus on the image yet
# append_group incus-admin
# usermod -aG incus-admin $user

mapfile -t wheelarray < <(getent group wheel | cut -d ":" -f 4 | tr ',' '\n')
for user in "${wheelarray[@]}"
do
usermod -aG docker "$user"
done