From 780db2be22f26f9db96db287ea2a28dfeb3a4b31 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 6 Jul 2020 21:52:13 -0500 Subject: [PATCH] fix: Updated Dockerfile. Referenced in #1826 (#1828) --- Dockerfile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index c583fbe7..ccb12f6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,16 @@ # Using Alpine to keep the images smaller -FROM alpine:latest +# Change to using the official NodeJS Alpine container +FROM node:alpine # Pushing all files into image WORKDIR /app -ADD . /app +COPY . /app -# Install updates and NodeJS+Dependencies -RUN apk add --update --no-cache --virtual build-dependencies git python build-base clang \ -# Install updates and NodeJS+Dependencies - && apk add --update --no-cache nodejs npm \ -# Install yarn - && npm i yarn -g \ # Install Pinafore - && yarn --production --pure-lockfile \ - && yarn build \ - && yarn cache clean \ - && rm -rf ./src \ -# Cleanup - && apk del build-dependencies +RUN yarn --production --pure-lockfile && \ + yarn build && \ + yarn cache clean && \ + rm -rf ./src ./docs ./tests ./bin # Expose port 4002 EXPOSE 4002