Skip to content

Instantly share code, notes, and snippets.

@nuriel77
Created November 24, 2019 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuriel77/3fd23831895ffad460e878ca4ec5a63a to your computer and use it in GitHub Desktop.
Save nuriel77/3fd23831895ffad460e878ca4ec5a63a to your computer and use it in GitHub Desktop.
# Build image
FROM node:10-alpine AS build
RUN apk --no-cache add --update \
g++ \
gcc \
libgcc \
libstdc++ \
make \
python && \
npm install --quiet node-gyp -g
WORKDIR /build
COPY package*.json ./
RUN npm i -g inschpektor --unsafe-perm && \
npm prune --production
# Final image
FROM node:10-alpine
ENV PORT=8732
WORKDIR /app
COPY --from=build /usr/local/lib/node_modules/inschpektor .
RUN ln -s backend/server.js inschpektor
CMD ["./inschpektor"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment