Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Update to nodejs stack use only package versions in base image (#710)
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Groeger <[email protected]>
  • Loading branch information
groeges authored Mar 12, 2020
1 parent 90285f3 commit 48c281d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions incubator/nodejs/image/Dockerfile-stack
Original file line number Diff line number Diff line change
Expand Up @@ -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 && npm audit fix"
ENV APPSODY_PREP="npm install"

ENV APPSODY_RUN="npm start --node-options --require=appmetrics-dash/attach"
ENV APPSODY_RUN_ON_CHANGE="npm start --node-options --require=appmetrics-dash/attach"
Expand All @@ -27,7 +27,7 @@ COPY ./project /project
COPY ./config /config

WORKDIR /project
RUN npm install && npm audit fix
RUN npm install

WORKDIR /project/user-app

Expand Down
12 changes: 0 additions & 12 deletions incubator/nodejs/image/project/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 user-app /project/user-app
# Removing node_modules as we can not make assumptions about file structure of user-app
Expand All @@ -22,12 +16,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
Expand Down
2 changes: 1 addition & 1 deletion incubator/nodejs/image/project/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs",
"version": "0.3.4",
"version": "0.3.5",
"description": "Node.js Stack",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion incubator/nodejs/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Node.js
version: 0.3.4
version: 0.3.5
description: Runtime for Node.js applications
license: Apache-2.0
language: nodejs
Expand Down

0 comments on commit 48c281d

Please sign in to comment.