diff --git a/Dockerfile b/Dockerfile index a37d770a..f7edacdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,18 @@ WORKDIR /app COPY package*.json /app/ -RUN apk add --no-cache tzdata -RUN apk add git -ENV TZ=America/Argentina/Buenos_Aires +# --no-cache: download package index on-the-fly, no need to cleanup afterwards +# --virtual: bundle packages, remove whole bundle at once, when done +RUN apk --no-cache --virtual build-dependencies add \ + python \ + make \ + g++ \ + git \ + tzdata \ + && npm install \ + && apk del build-dependencies -RUN npm install --prod -f +ENV TZ=America/Argentina/Buenos_Aires COPY . /app/