-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add linux-arm64, android-arm and android-arm64 prebuilds #587
Changes from 24 commits
579b4c6
99aaf92
92a2b3b
b384ab5
b886ee8
821a9fa
aba704b
c38859c
53e8575
92bb36e
12c43df
db6e652
fac4027
14c3c44
43c07af
9c76803
e057ee6
6ea1cba
08e0d59
1435e49
b513742
7112fe1
51c4cfb
d48e9dd
dfd15d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
DOCKER_USER="node" | ||
if [[ "$TRAVIS" == "true" ]]; then DOCKER_USER="travis"; fi | ||
|
||
exec docker run -u ${DOCKER_USER} --rm -it -v $(pwd):/app prebuild/${IMAGE} \ | ||
ralphtheninja marked this conversation as resolved.
Show resolved
Hide resolved
|
||
bash -c "npm i --ignore-scripts && npx prebuildify -t 8.14.0 --napi --strip" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean by that. Unsure what you mean here, mind writing snippet that explains the changes you want to make? Afaik, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'll elaborate. We can either A) skip So option B is to use a named volume. An anonymous volume may also work. Something like
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralphtheninja Can you explain the users? I'm guessing the working directory on the host is owned by
travis
, and docker must use the same user? Can't we change permissions instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to suggestions. If we don't do anything about the user (e.g. set
USER
in theDockerfile
) the container will run as root, thus producing binaries owned by root. Which leaves us with two options (as I see it):prebuildify-cross
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it some more, I think I prefer 2. since the docker image doesn't need any specific users. This needs some tweaking to the
cross-compile
script as well. Also need to look into howprebuildify-cross
does this with output folders etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked the initial approach of running as the
node
user. Why did that not work?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it runs as user with uid 1000 and the jenkins user is 2000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*travis user? 😉
Alright, I'm fine with both the current solution and the alternative, copying out the binaries.
The latter would also remove theignore me, it's latenpm i
problem (#587 (comment)), because if we copy out the binaries then we don't have to mount any volume.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, travis user. I don't know where jenkins came from. Jenkins! Get out of my head!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a perfect solution, but it works. Lets tweak it as we go?