Skip to content

Commit 283e0aa

Browse files
committed
Changes to make Docker image smaller and faster to build.
1 parent 4ea3c67 commit 283e0aa

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@ COPY . /app
55
WORKDIR /app
66
ARG DEBIAN_FRONTEND=noninteractive
77

8-
RUN npm install -g bower
9-
RUN npm install
10-
11-
#RUN adduser --disabled-password --gecos "" modular
12-
13-
RUN chown -R node:node /app
8+
RUN npm install -g bower \
9+
&& npm install \
10+
&& chown -R node:node /app \
11+
&& npm cache clean --force
1412

1513
USER node
1614
WORKDIR /app
1715
RUN bower install
1816

1917
EXPOSE 4000
2018

21-
USER root
2219
CMD ["npm", "start"]
2320

0 commit comments

Comments
 (0)