From e0d9a59f76699da73bf4ee6853ba023419d92c9a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 17 Apr 2019 16:55:57 -0700 Subject: [PATCH] Some docker caching fixes. --- Dockerfile | 6 ++++-- docker_update.sh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 docker_update.sh diff --git a/Dockerfile b/Dockerfile index 01a758501..098758499 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM node:10-jessie as node #If encounter Invalid cross-device error -run on host 'echo N | sudo tee /sys/module/overlay/parameters/metacopy' -COPY ui /app/ui WORKDIR /app/ui -RUN yarn + +COPY ui/package.json ui/yarn.lock ./ +RUN yarn install --pure-lockfile # This caches your deps +COPY ui /app/ui RUN yarn build FROM rust:1.33 as rust diff --git a/docker_update.sh b/docker_update.sh new file mode 100755 index 000000000..e51bd820a --- /dev/null +++ b/docker_update.sh @@ -0,0 +1,2 @@ +git pull +docker-compose up -d --no-deps --build