gardenlinux / builder

Builder used to construct Garden Linux. Re-usable for other OS-projects.
Apache License 2.0
9 stars 2 forks source link

As a User, I want to have the ability to ensure that builder is able to always build despite the choose container solution. #86

Open Akendo opened 5 months ago

Akendo commented 5 months ago

As a first-time user, I had difficulty building the project. My first impression was that I did something wrong. Therefore, I switched from docker to podman which lead to a set of unexpected problems since docker creating artifacts with root permission where podman doesn't.

To solve this, we should keep track of the used container solutions and make sure that the permissions are correct at given time.

fwilhe commented 5 months ago

Thanks for opening that issue. I think the problem needs solving, I'm not sure if I agree with the proposed solution.

I feel like keeping track of how the builder was invoked before will add hard to manage complexity.

Better documentation and/or error messages for common scenarios might also help a lot here, like testing for ownership of certain files.

Akendo commented 5 months ago

@fwilhe purposed some food for thoughts: He's uncertain about the complexity we might introduce by keeping track of the state. @nkraetzschmar might add some ideas as well.

fwilhe commented 5 months ago

Question, not sure how it works exactly: People might use docker with very different setups, i.e. they might always prefix it with sudo to avoid having to add their own account to the docker group. Does that influence the behaviour you described? The debian wiki says sudo is preferred, I always used to add my user to the group, I'm not sure if both setups produce the issue you described.

My suggestion would be to look for good assertions on 'if this file exists it needs to be writable' and use this to bail out with a better error message. The user might sill choose how to resolve, i.e. build with docker again instead of podman, or delete the .build directory, or selectively chown files.

fwilhe commented 5 months ago

wtf did not want to close the issue