beeware / beeware/briefcase

Docker image strategy is not compatible with multiple users sharing Docker resources

Open
#1,605 2 comments 0 reactions 0 assignees View on GitHub
bug linux
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

### Describe the bug

A use-case for Briefcase requires the creation of Docker images that are unique to the user that created the image; that is, the UID of the `brutus` user inside the image is the same as the user that ran Briefcase.

However, if different users on the same machine run the same Briefcase command, e.g. `briefcase build linux system --target debian:bookworm`, each user will create a docker image tagged as `briefcase/com.example.helloworld:debian-bookworm`....but the images will be different for each user.

When multiple users run such a `briefcase` command, each subsequent user will clobber the image created by the previous user. If users run such a `briefcase` command concurrently, they are likely to use an image created for another user and the command will likely fail.

### Steps to reproduce

Run `briefcase build linux system --target debian:bookworm` as two different users on the same machine where Docker resources are being shared. AFAICT, Docker images will be shared in a typical installation; although, I'm less sure of how Docker would be configured on a machine that is expected to be shared by multiple users concurrently...

### Expected behavior

The Docker image tags are not clobbered by other users.

### Screenshots

_No response_

### Environment

- Operating System: ubuntu 23.10
- Python version: 3.11
- Software versions:
- Briefcase: `0.3.17.dev205+ga995b09f`

### Logs

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the `briefcase build linux system --target debian:bookworm` entry point and how it tags Docker images. Check any existing Docker or build tests, then verify that different users and concurrent builds do not clobber or reuse each other's images.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.