Skip to content

Commit

Permalink
fix: faster docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Datron committed Sep 9, 2024
1 parent 5baad41 commit 02832c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions example.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 02832c3

Please sign in to comment.