From 20235bfe86fb3a082e1d773e68bef67ebef44b0c Mon Sep 17 00:00:00 2001 From: Steve Groeger Date: Thu, 12 Mar 2020 16:25:21 +0000 Subject: [PATCH] Updates to stack to only use base image packages (#709) Signed-off-by: Steven Groeger Co-authored-by: Kamran Shamsi <45264227+Kamran64@users.noreply.github.com> --- incubator/nodejs-express/image/Dockerfile-stack | 4 ++-- incubator/nodejs-express/image/project/Dockerfile | 12 ------------ incubator/nodejs-express/image/project/package.json | 2 +- incubator/nodejs-express/stack.yaml | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/incubator/nodejs-express/image/Dockerfile-stack b/incubator/nodejs-express/image/Dockerfile-stack index 758e99dd9..f0fc68d07 100644 --- a/incubator/nodejs-express/image/Dockerfile-stack +++ b/incubator/nodejs-express/image/Dockerfile-stack @@ -8,7 +8,7 @@ ENV APPSODY_WATCH_DIR=/project/user-app ENV APPSODY_WATCH_IGNORE_DIR=/project/user-app/node_modules ENV APPSODY_WATCH_REGEX="^.*.js$" -ENV APPSODY_PREP="npm install --prefix user-app && npm audit fix --prefix user-app" +ENV APPSODY_PREP="npm install --prefix user-app" ENV APPSODY_RUN="npm start" ENV APPSODY_RUN_ON_CHANGE="npm start" @@ -26,7 +26,7 @@ COPY ./LICENSE /licenses/ COPY ./project /project COPY ./config /config WORKDIR /project -RUN npm install && npm audit fix +RUN npm install ENV PORT=3000 ENV NODE_PATH=/project/user-app/node_modules diff --git a/incubator/nodejs-express/image/project/Dockerfile b/incubator/nodejs-express/image/project/Dockerfile index 27b6fc6fd..81634e65f 100644 --- a/incubator/nodejs-express/image/project/Dockerfile +++ b/incubator/nodejs-express/image/project/Dockerfile @@ -1,12 +1,6 @@ # Install the app dependencies in a full Node docker image FROM node:12 -# Install OS updates -RUN apt-get update \ - && apt-get dist-upgrade -y \ - && apt-get clean \ - && echo 'Finished installing dependencies' - # Copying individual files/folders as buildah 1.9.0 does not honour .dockerignore COPY package*.json /project/ COPY *.js /project/ @@ -28,12 +22,6 @@ RUN cd / && tar czf project.tgz project # Copy the dependencies into a slim Node docker image FROM node:12-slim -# Install OS updates -RUN apt-get update \ - && apt-get dist-upgrade -y \ - && apt-get clean \ - && echo 'Finished installing dependencies' - # Copy project with dependencies COPY --chown=node:node --from=0 /project.tgz / RUN tar xf project.tgz && chown -R node:node /project && rm project.tgz diff --git a/incubator/nodejs-express/image/project/package.json b/incubator/nodejs-express/image/project/package.json index 1bb048894..49eb34513 100644 --- a/incubator/nodejs-express/image/project/package.json +++ b/incubator/nodejs-express/image/project/package.json @@ -1,6 +1,6 @@ { "name": "nodejs-express", - "version": "0.4.4", + "version": "0.4.5", "description": "Node.js Express Stack", "license": "Apache-2.0", "repository": { diff --git a/incubator/nodejs-express/stack.yaml b/incubator/nodejs-express/stack.yaml index 1759ff3be..cc7b080fd 100644 --- a/incubator/nodejs-express/stack.yaml +++ b/incubator/nodejs-express/stack.yaml @@ -1,5 +1,5 @@ name: Node.js Express -version: 0.4.4 +version: 0.4.5 description: Express web framework for Node.js license: Apache-2.0 language: nodejs