mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
cache more layers for docker build
This commit is contained in:
parent
550c9703a6
commit
12910b23ed
1 changed files with 5 additions and 4 deletions
|
@ -16,12 +16,13 @@ RUN apk add --no-cache python3 py3-cryptography py3-pip py3-six py3-yaml py3-cli
|
||||||
RUN pip3 --no-cache-dir install apprise && \
|
RUN pip3 --no-cache-dir install apprise && \
|
||||||
rm -rf /root/.cache
|
rm -rf /root/.cache
|
||||||
|
|
||||||
# New things add here
|
# Install packages and cache the layer
|
||||||
|
COPY ./package.json ./package.json
|
||||||
|
RUN npm install --only=prod && rm -f ./package-lock.json
|
||||||
|
|
||||||
|
# Install dev packages, delete it after build
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm install && \
|
RUN npm install --only=dev && npm run build && npm prune
|
||||||
npm run build && \
|
|
||||||
npm prune
|
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
|
|
Loading…
Reference in a new issue