Build recipes in Dockerfile + fixes for rootless - #168
Draft
rickyelopez wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just opening this to hopefully get a sense of whether rootless operation is something that you would be interested in supporting.
I was not able to come up with a way to build the recipes at startup when running as a non-root user. I realize that one of the big reasons to host this locally is to be able to use custom recipes. I'm sure there's a clever way to support it (like maybe
docker execing a command as root to build the recipes) but even if there isn't, all the building code I removed fromentrypoint.shcould be re-introduced behind aif [ "$RECIPE_SOURCE" != "bundled" ]check, or similar, to support both usecases with an env var.The only other changes that were really required to run rootless were:
adonis key:generate --forcetonode ace generate:keywhich I think is equivalent? Not positive.nodecommands (both the existingmigratecommand and theace generate:keycommand added above) withCACHE_DIR=/tmp/adonis-cacheto get it to put the cache somewhere the non-root use has access to.Building the recipes in the Dockerfile could also be avoided if builds were added to the
recipesrepo directly. Then, this Dockerfile could just pull down the latest set of artifacts from there. I had to addgitto the recipes builder because simple-git was erroring out without it. Definitely avoidable with some changes to catch and handle the error, though.Also, not sure if additional files need to be copied over from the recipes build. I copied what seem (to me) to be the relevant ones but I really only took a cursory glance here.
Is there any appetite to support this? No worries if not, this is working for me and probably won't be too bad to keep up-to-date for myself.