From 02832c3c1759c900d5b35b51f2abafc4e48a49a8 Mon Sep 17 00:00:00 2001 From: Kartik Date: Mon, 9 Sep 2024 13:10:47 +0530 Subject: [PATCH] fix: faster docker builds --- Dockerfile | 3 ++- example.Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 98a88dcdc..d511f53b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,8 @@ ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}" RUN node --version -RUN cargo install wasm-pack +RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + COPY . . RUN npm ci --loglevel=info diff --git a/example.Dockerfile b/example.Dockerfile index 53adecead..376da21fd 100644 --- a/example.Dockerfile +++ b/example.Dockerfile @@ -4,7 +4,7 @@ WORKDIR /build # install nodeJS for functions ENV NVM_DIR /usr/local/nvm -ENV NODE_VERSION 18.19.0 +ENV NODE_VERSION 20.17.0 RUN mkdir -p $NVM_DIR RUN curl "https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh" | bash \ @@ -17,7 +17,7 @@ ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}" RUN node --version -RUN cargo install wasm-pack +RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh COPY . . RUN npm ci --loglevel=info @@ -41,7 +41,7 @@ RUN cargo build --release FROM debian:bookworm-slim as runtime -ENV NODE_VERSION=18.19.0 +ENV NODE_VERSION=20.17.0 WORKDIR /app RUN apt-get update && apt-get install -y libpq5 ca-certificates curl supervisor