From f10f56fa1a4547c56d39fbeaac7040ef92a76c88 Mon Sep 17 00:00:00 2001 From: adrian Date: Thu, 28 Apr 2022 14:03:28 -0400 Subject: [PATCH] fix dockerfile --- Dockerfile | 10 ++++------ README.md | 7 ++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b56017..031f76a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,21 +4,19 @@ RUN mkdir -p /opt/app WORKDIR /opt/app -RUN apk add --update --no-cache git +RUN apk add --update --no-cache COPY . . -RUN npm install && npm clean && npm build +RUN npm install && npm run clean && npm run build FROM node:16.13-alpine AS image-run WORKDIR /opt/app -COPY --from=image-build ./opt/app/dist ./dist +COPY --from=build-image ./opt/app/dist ./dist COPY package* ./ RUN NODE_ENV=production npm install --production --ignore-optional && \ - npm autoclean --init && \ - npm autoclean --force && \ - npm cache clean + npm prune EXPOSE 3232 diff --git a/README.md b/README.md index 62acf2c..ff90d46 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ a kids-first instantiation of the persona microservice: https://github.com/kids- - Create a local `.env` file based on the provided schema in `.env.schema` ``` -npm --ignore-optional && \ - npm build && \ - npm autoclean --init && \ - npm autoclean --force && \ - npm cache clean && npm start + npm run build && \ + npm prune && npm start ```