Skip to content

Commit 369fb39

Browse files
committed
Update dockerfile and readme based on testing with Jeff
1 parent c7da508 commit 369fb39

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
33
# https://github.com/nodejs/docker-node
44

5+
# Node.js base image
6+
FROM node:8
7+
58
# default NODE_ENV for building the app (clientside JS etc.)
69
ARG NODE_ENV=production
710

811
# default NODE_ENV for running the server
912
ENV NODE_ENV=production
1013

11-
# Node.js base image
12-
FROM node:8
13-
1414
# Create an unprivileged user w/ home directory
1515
RUN groupadd appuser \
1616
&& useradd --gid appuser --shell /bin/bash --create-home appuser
@@ -23,7 +23,8 @@ WORKDIR /home/appuser/app
2323
COPY . /home/appuser/app
2424

2525
# Install app dependencies
26-
RUN npm install
26+
# Note: must be development so that dev deps are installed
27+
RUN NODE_ENV=development npm install
2728

2829
# Build project
2930
RUN npm run clean

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ docker build --build-arg NODE_ENV=production -t app-ui .
7878
Run the container:
7979

8080
```
81-
docker run -it --rm -p 12345:3000 -u "appuser" -e "NODE_ENV=production" --name "app-ui" app-ui:local
81+
docker run -it --rm -p 12345:3000 -e "NODE_ENV=production" --name "app-ui" app-ui
8282
```
8383

8484
Notes:

0 commit comments

Comments
 (0)