Skip to content

Commit

Permalink
Merge pull request #10 from openkraken/fix/old_linux_binary
Browse files Browse the repository at this point in the history
fix: update linux to older linux distribution
  • Loading branch information
andycall authored Mar 2, 2022
2 parents d247241 + 5467e67 commit 9c4d9d6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Build linux prebuild binary

# syntax=docker/dockerfile:1
FROM centos:centos7
RUN yum install centos-release-scl-rh -y
RUN yum install rh-nodejs12 -y
RUN yum install python3 -y
RUN yum install devtoolset-7 -y
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,26 @@ qjsc.getSupportedVersions();
```
node-gyp configure -- -f gyp.generator.compile_commands_json.py
```

**Prebuild linux binary**

1. Install docker
2. Build local image with Dockerfile
```
docker build -t qjsc .
```
3. Enter into images
```
docker run --rm -it -v $(pwd):/project qjsc
```
4. Set up env in docker container
```
cd project
scl enable rh-nodejs12 bash
scl enable devtoolset-7 bash
```
5. Build your binary
```
npm install
npm run prebuild
```
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qjsc",
"version": "0.2.9",
"version": "0.2.10",
"description": "Node.js addon for the Quickjs compiler",
"main": "index.js",
"bin": {
Expand Down
Binary file modified prebuilds/linux-x64/node.napi.node
Binary file not shown.

0 comments on commit 9c4d9d6

Please sign in to comment.