Skip to content

Commit 036e035

Browse files
paulbalajiclaude
andauthored
fix(docker): switch back to Alpine base image (#7564)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 71204f3 commit 036e035

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/monorepo-docker.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- 'docker-entrypoint.sh'
1414
- '.dockerignore'
1515
- '.github/workflows/monorepo-docker.yml'
16+
- 'solidity/.foundryrc'
1617
- 'typescript/ccip-server/**'
1718
# Dependency changes that could affect the Docker build
1819
- 'yarn.lock'
@@ -99,6 +100,12 @@ jobs:
99100
REGISTRY_VERSION=$(cat .registryrc)
100101
echo "REGISTRY_VERSION=$REGISTRY_VERSION" >> $GITHUB_ENV
101102
103+
- name: Read Foundry version
104+
shell: bash
105+
run: |
106+
FOUNDRY_VERSION=$(cat solidity/.foundryrc)
107+
echo "FOUNDRY_VERSION=$FOUNDRY_VERSION" >> $GITHUB_ENV
108+
102109
- name: Determine platforms
103110
id: determine-platforms
104111
run: |
@@ -119,6 +126,7 @@ jobs:
119126
tags: ${{ steps.meta.outputs.tags }}
120127
labels: ${{ steps.meta.outputs.labels }}
121128
build-args: |
129+
FOUNDRY_VERSION=${{ env.FOUNDRY_VERSION }}
122130
REGISTRY_COMMIT=${{ env.REGISTRY_VERSION }}
123131
platforms: ${{ steps.determine-platforms.outputs.platforms }}
124132

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
FROM node:20-slim
1+
FROM node:20-alpine
22

33
WORKDIR /hyperlane-monorepo
44

5-
RUN apt-get update && apt-get install -y --no-install-recommends \
6-
git g++ make python3 python3-pip jq bash curl ca-certificates unzip \
7-
&& rm -rf /var/lib/apt/lists/* \
8-
&& yarn set version 4.5.1
5+
RUN apk add --update --no-cache git g++ make py3-pip jq bash curl && \
6+
yarn set version 4.5.1
97

10-
# Install Foundry for solidity builds (early for layer caching)
11-
COPY solidity/.foundryrc ./solidity/
12-
RUN curl -L https://foundry.paradigm.xyz | bash
13-
RUN /root/.foundry/bin/foundryup --install $(cat solidity/.foundryrc)
14-
ENV PATH="/root/.foundry/bin:${PATH}"
8+
# Install Foundry (Alpine binaries) - pinned version for reproducibility
9+
ARG FOUNDRY_VERSION
10+
ARG TARGETARCH
11+
RUN set -o pipefail && \
12+
ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64" || echo "amd64") && \
13+
curl --fail -L "https://github.com/foundry-rs/foundry/releases/download/${FOUNDRY_VERSION}/foundry_${FOUNDRY_VERSION}_alpine_${ARCH}.tar.gz" | tar -xzC /usr/local/bin forge cast
1514

1615
# Copy package.json and friends
1716
COPY package.json yarn.lock .yarnrc.yml ./

0 commit comments

Comments
 (0)