Created
May 3, 2017 08:53
-
-
Save mastilver/89280f7da08bfd80bc54a980759415df to your computer and use it in GitHub Desktop.
Mininal docker container build with pkg
This file contains 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
node_modules |
This file contains 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
# Highly inspired by https://github.com/dockerpkg/dockerpkg | |
# Needs docker 17.05 | |
FROM node:7.9-alpine | |
RUN npm install -g pkg | |
COPY ./ ./ | |
RUN npm i | |
RUN pkg -t node7-alpine-x64 index.js -o /app/app.bin | |
FROM alpine:3.5 | |
CMD ["/app/app.bin"] |
This file contains 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
console.log('Hello world!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment