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

Podman build #3

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Podman build #3

merged 1 commit into from
Jun 22, 2022

Conversation

dbnicholson
Copy link
Member

This is on top of learningequality#108. I was going to send this upstream, but maybe we should test it out here first. I successfully did a few podman and docker builds with it.

@danigm
Copy link

danigm commented Apr 28, 2022

I've been testing to build using podman with this change and it's working correctly for me.

In podman, a user namespace is setup with IDs mapped such that the
executing user is root in the container. When that's the case (or if
docker is in use and the executing user is root), don't override the
container user or the HOME environment variable. In that case, the
container user's home directory will be /root, so mount the cache there
instead of the predefined /cache.
@dbnicholson
Copy link
Member Author

Rebased this now. We'll see if it breaks the CI...

if [ "$BUILD_UID" -eq 0 ]; then
BUILD_CACHE_PATH=/root
else
BUILD_CACHE_PATH=/cache
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing here. The changes in the --user parameter works for me. But the change in BUILD_CACHE_PATH is making the caching worse. I ran the build a second time and is taking ages. I will keep testing.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing here. The changes in the --user parameter works for me. But the change in BUILD_CACHE_PATH is making the caching worse. I ran the build a second time and is taking ages. I will keep testing.

I was wrong! This branch in fact reduces the successive builds to 1 minute. Great!!

@manuq manuq merged commit e2a2cb7 into develop Jun 22, 2022
@manuq manuq deleted the podman-build branch June 22, 2022 22:07
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.

3 participants