Skip to content

Instantly share code, notes, and snippets.

@mastilver
Created May 3, 2017 08:53
Show Gist options
  • Save mastilver/89280f7da08bfd80bc54a980759415df to your computer and use it in GitHub Desktop.
Save mastilver/89280f7da08bfd80bc54a980759415df to your computer and use it in GitHub Desktop.
Mininal docker container build with pkg
# 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"]
console.log('Hello world!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment