File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,13 +8,20 @@ RUN apt-get update -qq && \
88
99RUN npm i -g npm@6.14.18
1010
11+ COPY bin/docker-entrypoint /usr/local/bin/frontend-entrypoint
12+
13+ RUN chmod +x /usr/local/bin/frontend-entrypoint && \
14+ chown -R node:node /app
15+
1116ENV CHROME_BIN=/usr/bin/chromium
1217ENV OPENSSL_CONF=/dev/null
1318
14- COPY package*.json bower.json .bowerrc .npmrc ./
15- COPY patches ./patches
19+ USER node
20+
21+ COPY --chown=node:node package*.json bower.json .bowerrc .npmrc ./
22+ COPY --chown=node:node patches ./patches
1623
17- RUN npm install --unsafe-perm && \
24+ RUN npm install && \
1825 { \
1926 for file in package.json package-lock.json bower.json .bowerrc .npmrc; do \
2027 [ -f "$file" ] && sha256sum "$file" ; \
@@ -24,11 +31,7 @@ RUN npm install --unsafe-perm && \
2431 done; \
2532 } | sha256sum | awk '{print $1}' > ./node_modules/.docker-dependencies-checksum
2633
27- COPY bin/docker-entrypoint /usr/local/bin/frontend-entrypoint
28-
29- RUN chmod +x /usr/local/bin/frontend-entrypoint
30-
31- COPY . .
34+ COPY --chown=node:node . .
3235
3336ENTRYPOINT ["/usr/local/bin/frontend-entrypoint" ]
3437
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ current_checksum="$(dependencies_checksum)"
2121if [ ! -x ./node_modules/.bin/ember ] ||
2222 [ ! -f " $checksum_file " ] ||
2323 [ " $( cat " $checksum_file " ) " != " $current_checksum " ]; then
24- npm install --unsafe-perm
24+ npm install
2525 printf ' %s\n' " $current_checksum " > " $checksum_file "
2626fi
2727
Original file line number Diff line number Diff line change 1111 "license" : " MIT" ,
1212 "author" : " " ,
1313 "scripts" : {
14- "postinstall" : " patch-package && ./node_modules/bower/bin/bower --allow-root install" ,
14+ "postinstall" : " patch-package && ./node_modules/bower/bin/bower install" ,
1515 "build" : " ember build --environment=production" ,
1616 "lint:js" : " eslint ./*.js app config lib server tests" ,
1717 "start" : " serve dist -l ${PORT:-4300} -s" ,
You can’t perform that action at this time.
0 commit comments