Skip to content

Commit

Permalink
tilt: nodejs multi-platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Dec 12, 2024
1 parent 4a9c0cf commit 8f75d36
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.const
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM cli-gen as cli-export
FROM node:18-alpine@sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 as const-build
FROM node:18-alpine@sha256:6eb9c3d9bd191bd2cc6ce7ec3d5ec4c2127616140c8586af96a6bec8f28689d1 as const-build

# fetch scripts/guardian-set-init.sh deps
RUN apk update && apk add bash g++ make python3 curl jq findutils
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS go-tools
FROM docker.io/golang:1.23.3-bullseye@sha256:9e53abacfc22cd3df3e4ebcc04ac64951b71d2a38c52b690f3807af6a2000ed2 AS go-tools

RUN mkdir /app

Expand All @@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/root/.cache --mount=type=cache,target=/go \
cd /app/tools && CGO_ENABLED=0 ./build.sh

# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS go-build
FROM docker.io/golang:1.23.3-bullseye@sha256:9e53abacfc22cd3df3e4ebcc04ac64951b71d2a38c52b690f3807af6a2000ed2 AS go-build

COPY --from=go-tools /app /app

Expand All @@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/root/.cache \
tools/bin/buf lint && \
tools/bin/buf generate

FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20 AS node-build
FROM node:16-alpine@sha256:a1f9d027912b58a7c75be7716c97cfbc6d3099f3a97ed84aa490be9dee20e787 AS node-build

COPY --from=go-tools /app /app

Expand Down
4 changes: 3 additions & 1 deletion clients/js/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM node:18-alpine@sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 as cli-build
FROM node:18-alpine@sha256:6eb9c3d9bd191bd2cc6ce7ec3d5ec4c2127616140c8586af96a6bec8f28689d1 as cli-build

RUN apk update && apk add g++ make python3

# Copy package.json & package-lock.json by themselves to create a cache layer
COPY package.json package-lock.json /clients/js/
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM const-gen AS const-export
FROM cosmwasm_artifacts AS artifacts

# Contract deployment stage
FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546
FROM node:16-buster-slim@sha256:3ebf2875c188d22939c6ab080cfb1a4a6248cc86bae600ea8e2326aa03acdb8f

RUN apt update && apt install netcat curl jq -y

Expand Down
2 changes: 1 addition & 1 deletion near/Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY . .

RUN ./build-contracts.sh

FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20 AS deploy
FROM node:16-alpine@sha256:a1f9d027912b58a7c75be7716c97cfbc6d3099f3a97ed84aa490be9dee20e787 AS deploy

WORKDIR /app
COPY package.json .
Expand Down
4 changes: 2 additions & 2 deletions relayer/generic_relayer/relayer-engine-v2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
FROM node:19.6.1-slim@sha256:e684615bdfb71cb676b3d0dfcc538c416f7254697d8f9639bd87255062fd1681

# npm wants to clone random Git repositories - lovely.
# RUN apk add git python make build-base
# RUN apk update && apk add bash
RUN apt-get update && apt-get -y install \
git python make curl netcat
git python3 make curl netcat g++

RUN npm i typescript -g

Expand Down
2 changes: 1 addition & 1 deletion terra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM scratch as artifacts
COPY --from=builder /code/artifacts /

# Contract deployment stage
FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546
FROM node:16-buster-slim@sha256:3ebf2875c188d22939c6ab080cfb1a4a6248cc86bae600ea8e2326aa03acdb8f

RUN apt update && apt install netcat curl jq -y

Expand Down
4 changes: 2 additions & 2 deletions testing/Dockerfile.querysdk.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
FROM node:19.6.1-slim@sha256:e684615bdfb71cb676b3d0dfcc538c416f7254697d8f9639bd87255062fd1681

RUN apt-get update && apt-get -y install \
git python3 make curl netcat
git python3 make curl netcat g++

RUN mkdir -p /app
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions testing/Dockerfile.spydk.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
FROM node:19.6.1-slim@sha256:e684615bdfb71cb676b3d0dfcc538c416f7254697d8f9639bd87255062fd1681

RUN apt-get update && apt-get -y install \
git python3 make curl netcat
git python3 make curl netcat g++

RUN mkdir -p /app
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions wormchain/Dockerfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ FROM const-gen AS const-export
FROM cosmwasm_artifacts AS artifacts

# Contract deployment stage
FROM node:20.13.1-buster-slim@sha256:8916ca78cc94933fdaef715531141c8a658bea61b89d7d88a1b2dcc0a1ae92f6
FROM node:20.13.1-buster-slim@sha256:7ab273816c6bc500ddba1400d825708a5a5ed963cdc17c32d3fce70ac9a0f477

RUN apt update && apt install netcat curl jq -y
RUN apt update && apt install -y python3 make g++ netcat curl jq

WORKDIR /app/tools

Expand Down

0 comments on commit 8f75d36

Please sign in to comment.