Created
November 24, 2019 21:13
-
-
Save nuriel77/3fd23831895ffad460e878ca4ec5a63a to your computer and use it in GitHub Desktop.
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
# 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