reorder docker image commands for faster rebuild
(unless dependencies change)
This commit is contained in:
parent
4e2b713065
commit
c6335dd4d7
1 changed files with 8 additions and 6 deletions
|
|
@ -54,12 +54,7 @@ ENTRYPOINT ["/init"]
|
||||||
# Set shell
|
# Set shell
|
||||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
# Copy data for add-on
|
#ARG BUILD_ARCH
|
||||||
COPY ./*.js /plejd/
|
|
||||||
COPY ./config.json /plejd/
|
|
||||||
COPY ./package.json /plejd/
|
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
|
||||||
|
|
||||||
# Install Node
|
# Install Node
|
||||||
RUN apk add --no-cache jq
|
RUN apk add --no-cache jq
|
||||||
|
|
@ -85,6 +80,9 @@ RUN \
|
||||||
&& npm config set unsafe-perm true
|
&& npm config set unsafe-perm true
|
||||||
|
|
||||||
WORKDIR /plejd
|
WORKDIR /plejd
|
||||||
|
|
||||||
|
# Install node depdendencies
|
||||||
|
COPY ./package.json /plejd/
|
||||||
RUN npm install \
|
RUN npm install \
|
||||||
--no-audit \
|
--no-audit \
|
||||||
--no-update-notifier \
|
--no-update-notifier \
|
||||||
|
|
@ -93,6 +91,10 @@ RUN npm install \
|
||||||
# Copy root filesystem
|
# Copy root filesystem
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
|
# Copy data for add-on
|
||||||
|
COPY ./*.js /plejd/
|
||||||
|
COPY ./config.json /plejd/
|
||||||
|
|
||||||
# Set up empty /data/options.json
|
# Set up empty /data/options.json
|
||||||
RUN mkdir -p /data && echo "{}" > /data/options.json
|
RUN mkdir -p /data && echo "{}" > /data/options.json
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue