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

perf(docker): build executable #764

Merged
merged 14 commits into from
Mar 4, 2023
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM node:16-alpine
FROM node:16-alpine as builder

COPY . /rdme

RUN cd /rdme && npm ci && npm run build
RUN cd /rdme && npm ci && npm run build && npx pkg . --target host --out-path exe

CMD ["sh", "-c", "/rdme/bin/rdme $INPUT_RDME"]
FROM alpine:3.14

COPY --from=builder /rdme/exe /exe

ENTRYPOINT ["sh", "-c", "/exe/rdme $INPUT_RDME"]
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,8 @@
]
}
},
"pkg": {
"assets": "dist/config/**/*"
},
"prettier": "@readme/eslint-config/prettier"
}