Update Dockerfile

This commit is contained in:
Joshua Schnabel
2020-04-28 22:05:53 +02:00
committed by GitHub
parent 17982954fd
commit 02813294bb

View File

@ -6,7 +6,7 @@ COPY scripts/*.sh /tmp/
# Install tools, create Node-RED app and data dir, add user and set rights # Install tools, create Node-RED app and data dir, add user and set rights
RUN set -ex && \ RUN set -ex && \
apt-get update && \ apt-get update && \
apt-get intsall --no-cache \ apt-get intsall \
bash \ bash \
tzdata \ tzdata \
iputils \ iputils \
@ -31,7 +31,7 @@ COPY package.json .
FROM base AS build FROM base AS build
# Install Build tools # Install Build tools
RUN apt-get update && apt-get intsall --no-cache --virtual buildtools build-base linux-headers udev python && \ RUN apt-get update && apt-get intsall buildtools build-base linux-headers udev python && \
npm install --unsafe-perm --no-update-notifier --only=production && \ npm install --unsafe-perm --no-update-notifier --only=production && \
/tmp/remove_native_gpio.sh && \ /tmp/remove_native_gpio.sh && \
cp -R node_modules prod_node_modules cp -R node_modules prod_node_modules
@ -45,6 +45,10 @@ COPY --from=build /usr/src/node-red/prod_node_modules ./node_modules
RUN chown -R node-red:node-red /usr/src/node-red && \ RUN chown -R node-red:node-red /usr/src/node-red && \
/tmp/install_devtools.sh && \ /tmp/install_devtools.sh && \
rm -r /tmp/* rm -r /tmp/*
RUN apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
USER node-red USER node-red