block / block/proto-fleet

run-fleet.sh fails on fresh Ubuntu 25.04: docker group missing and buildx-plugin dpkg state

Open
#88 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
55
Forks
16
Avg merge
1d 22h
Merged PRs (30d)
87

Description

### Describe the bug

On a fresh Ubuntu 25.04 host with no Docker pre-installed, the deployment script installs Docker via `get.docker.com`, then immediately runs `sudo usermod -aG docker $USER`. On this host the `docker` group has not been created, so `usermod` fails with `usermod: group 'docker' does not exist`. The script then instructs the user to log out and back in, but that does not help because the group was never created.

Separately, after installing Docker manually as a workaround, `docker-buildx-plugin` ends up in a broken dpkg state and has to be reinstalled before Docker can be configured.

### Preconditions

- Fresh Ubuntu 25.04 VM
- Docker not pre-installed

### Steps to reproduce

1. On a fresh Ubuntu 25.04 host with no Docker installed, run the installer per [`deployment-files/README.md`](https://github.com/block/proto-fleet/blob/main/deployment-files/README.md).
2. Observe `usermod: group 'docker' does not exist` and the prompt to log out/in.
3. Log out and back in, re-run the script, same error.
4. Install Docker manually. `docker-buildx-plugin` ends up in a broken dpkg state: `package is in a very bad inconsistent state; you should reinstall it before attempting configuration`. Workaround: `sudo apt reinstall docker-buildx-plugin`, then follow Docker's install instructions.

### Expected behavior

The script should create the `docker` group if `get.docker.com` did not, before attempting `usermod -aG docker`. The offending block is [`deployment-files/run-fleet.sh:245-251`](https://github.com/block/proto-fleet/blob/main/deployment-files/run-fleet.sh#L245-L251). One option: `getent group docker || sudo groupadd docker` before the `usermod` call.

Ideally the script should also verify `docker buildx version` works before reaching `docker compose build` at [`deployment-files/run-fleet.sh:583`](https://github.com/block/proto-fleet/blob/main/deployment-files/run-fleet.sh#L583), and surface a clearer error/remediation if buildx is broken.

### Proto Fleet version

v0.2.6

### Environment

- OS: Ubuntu 25.04
- Docker: not pre-installed (installed by the script via `get.docker.com`)

### Logs

```text
🔧 Running deployment script...
Adding current user to the docker group for passwordless Docker usage...
usermod: group 'docker' does not exist
Please log out and log back in to apply group changes, then re-run this script.
```

```text
dpkg: error processing package docker-buildx-plugin (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
docker-buildx-plugin
```

Contributor guide

Open the contributing guide

Research direction

Start with deployment-files/run-fleet.sh lines 245-251 and reproduce the installer on a fresh Ubuntu 25.04 host. Check the Docker group handling, then inspect the path to docker compose build at line 583 and test behavior when docker-buildx-plugin is broken. Done means the script handles a missing docker group and reports a clear buildx failure or remediation before the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell, ubuntu
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.