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

Docker build #81

Merged
merged 3 commits into from
Aug 28, 2020
Merged

Docker build #81

merged 3 commits into from
Aug 28, 2020

Conversation

bjoernd
Copy link
Contributor

@bjoernd bjoernd commented Aug 28, 2020

Description of changes:

Adjust the way we build our docker image so that later builds run with the user and group ID of the outside user rather than root and thereby prevent file permission issues with the resulting builds.

Fixes #53

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fedora uses some stringent SELinux configuration that fails to pass through
shared directories to a container. To fix this, we need to ask Docker to
properly adjust the directory's permissions before passing it through.
http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/

Add a config variable to our docker run command and extend the Fedora example
in the README.

Signed-off-by: Bjoern Doebel <[email protected]>
@bjoernd
Copy link
Contributor Author

bjoernd commented Aug 28, 2020

This breaks MAC builds again... :(

Docker by default executes things as the root user, leading to permissions
problems further down the road. (i.e., if I build boot.iso in docker, the
resulting file is owned by root and a later `make boot` fails on my Linux
system.)

Fix this by creating a user within our docker image that has the appropriate
user ID and group ID of the outside user. Thus, resulting files have proper
ownership and make boot succeeds.

Signed-off-by: Bjoern Doebel <[email protected]>
Depending on the `all` target, caused a chain of `make boot` -> `make boot.iso`
to always execute. However, we only want to regenerate the ISO if the
kernel.bin has changed. Hence, make the ISO_FILE target explicitly depend on
the kernel.bin file instead.

Signed-off-by: Bjoern Doebel <[email protected]>
@bjoernd bjoernd merged commit 4d89b29 into KernelTestFramework:mainline Aug 28, 2020
@bjoernd bjoernd deleted the docker-build branch August 28, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] make boot regenerates ISO
2 participants