Skip to content

Commit

Permalink
chore: Pin node version in docker base images and bump nvmrc
Browse files Browse the repository at this point in the history
We were using a floating version of node in our base images, which means
we didn't control when we updated the node version. Also, we were using
an outdated version for local development, which didn't match the one
used for the base images.

This changeset bumps nvmrc to latest node (18.19.0) and pins down the
version of all node base images across dockerfiles in the project.
  • Loading branch information
spalladino committed Dec 4, 2023
1 parent ac1f03c commit 392090a
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.8.0
v18.19.0
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq coreutils
COPY --from=0 /usr/src/barretenberg/cpp/build /usr/src/barretenberg/cpp/build
COPY --from=noir-acir-tests /usr/src/noir/test_programs /usr/src/noir/test_programs
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18
FROM node:18.19.0
COPY --from=0 /usr/src/barretenberg/ts /usr/src/barretenberg/ts
COPY --from=noir-acir-tests /usr/src/noir/test_programs /usr/src/noir/test_programs
RUN apt update && apt install -y lsof jq
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clan
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-sol
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq
COPY --from=0 /usr/src/barretenberg/cpp/build /usr/src/barretenberg/cpp/build
COPY --from=1 /usr/src/barretenberg/sol/src/ultra/BaseUltraVerifier.sol /usr/src/barretenberg/sol/src/ultra/BaseUltraVerifier.sol
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/ts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-wasm-linux-clang

FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=0 /usr/src/barretenberg /usr/src/barretenberg

# Create a standalone container that can run bb.js (and tests).
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Linting requires node.
FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache build-base git python3 curl bash jq
WORKDIR /usr/src/l1-contracts
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-faucet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /usr/src/yarn-project/aztec-faucet
RUN yarn cache clean && yarn workspaces focus --production

# Create final, minimal size image.
FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src/ /usr/src/
WORKDIR /usr/src/yarn-project/aztec-faucet
ENTRYPOINT ["yarn"]
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/aztec-sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS yarn-project

# Need new arch specific image.
FROM node:18-alpine as builder
FROM node:18.19.0-alpine as builder
COPY --from=yarn-project /usr/src /usr/src
ARG COMMIT_TAG=""

Expand All @@ -21,7 +21,7 @@ RUN if [[ -n "${COMMIT_TAG}" ]]; then \
RUN yarn workspaces focus --production && yarn cache clean && rm -rf ../**/src

# Create final, arch specific, minimal size image.
FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src/yarn-project /usr/src/yarn-project
COPY --from=builder /usr/src/barretenberg/ts/package /usr/src/barretenberg/ts/package
COPY --from=builder /usr/src/noir/packages /usr/src/noir/packages
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/canary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine AS builder
FROM node:18.19.0-alpine AS builder

RUN apk update && apk add --no-cache bash jq curl

Expand All @@ -20,7 +20,7 @@ WORKDIR /usr/src/canary
RUN ./scripts/update_packages.sh canary ../end-to-end/
RUN yarn && yarn build

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache udev ttf-freefont chromium bash
ENV CHROME_BIN="/usr/bin/chromium-browser" PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/canary/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WORKDIR /usr/src/yarn-project/canary
# Productionify. See comment in yarn-project-base/Dockerfile.
RUN yarn cache clean && yarn workspaces focus --production

FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src /usr/src
WORKDIR /usr/src/yarn-project/canary
ENTRYPOINT ["yarn", "test"]
4 changes: 2 additions & 2 deletions yarn-project/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS yarn-project

# Need new arch specific image.
FROM node:18-alpine as builder
FROM node:18.19.0-alpine as builder
COPY --from=yarn-project /usr/src /usr/src
ARG COMMIT_TAG=""

Expand All @@ -14,7 +14,7 @@ RUN if [[ -n "${COMMIT_TAG}" ]]; then \
RUN yarn workspaces focus --production && yarn cache clean && rm -rf ../**/src

# Create final, arch specific, minimal size image.
FROM node:18-alpine
FROM node:18.19.0-alpine
COPY --from=builder /usr/src/yarn-project /usr/src/yarn-project
COPY --from=builder /usr/src/barretenberg/ts/package /usr/src/barretenberg/ts/package
COPY --from=builder /usr/src/noir/packages /usr/src/noir/packages
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN yarn cache clean && yarn workspaces focus --production

# Create final, minimal size image.
# TODO: Not very minimal as chromium adds about 500MB of bloat :/ Separate or install at test runtime?
FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache \
jq \
bash \
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/yarn-project-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js as bb.js
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir as noir
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-packages as noir-packages

FROM node:18-alpine
FROM node:18.19.0-alpine
RUN apk update && apk add --no-cache bash jq curl

# Copy L1 contracts.
Expand Down
2 changes: 1 addition & 1 deletion yellow-paper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:18.19.0-alpine
WORKDIR /usr/src
COPY . .
RUN yarn && yarn build --no-minify

0 comments on commit 392090a

Please sign in to comment.