Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit b63489a

Browse files
cgmartinwardbell
authored andcommitted
dockerfile speed optimizations
closes #36
1 parent 34cd392 commit b63489a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ RUN mkdir -p /quickstart /home/nodejs && \
1111
chown -R nodejs:nodejs /home/nodejs
1212

1313
WORKDIR /quickstart
14-
COPY . /quickstart/
15-
RUN chown -R nodejs:nodejs /quickstart
14+
COPY package.json typings.json /quickstart/
15+
RUN npm install --unsafe-perm=true
1616

17+
COPY . /quickstart
18+
RUN chown -R nodejs:nodejs /quickstart
1719
USER nodejs
18-
RUN npm install
1920

2021
CMD npm start

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"lite": "lite-server",
99
"typings": "typings",
1010
"docker-build": "docker build -t ng2-quickstart .",
11-
"docker-run": "docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart",
11+
"docker": "npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart",
1212
"postinstall": "typings install"
1313
},
1414
"license": "ISC",

0 commit comments

Comments
 (0)