UNCLASSIFIED - NO CUI

Skip to content

fix(k3d-dev): handled the case where apt doesn't create the docker group

General MR

Summary

This MR fixes a situation in the k3d-dev script that can occur when the docker package installation does not create the docker group. This should also safely handle situations where the docker group did get created successfully due to the -f flag.

Relevant logs/screenshots

Before:

+ sudo usermod -aG docker ubuntu
usermod: group 'docker' does not exist
Connection to 3.31.178.81 closed.
Batch file /tmp/k3d_dev_run_batchqwR failed on target system.

After:

+ sudo groupadd -f docker
+ sudo usermod -aG docker ubuntu
+ sudo systemctl enable --now docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
Connection to 15.205.44.180 closed.
Installing k3d on instance

Linked Issue

Closes #2760 (closed)

Upgrade Notices

N/A

Edited by Zach Callahan

Merge request reports

Loading