Commit 4bfc88c8 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #2949 from ethereum-optimism/ops/docker-foundry-version

ops: use alpine:3.14 with foundry image
parents 4702cd6b bdaef384
---
'@eth-optimism/foundry': patch
---
Use alpine:3.14
......@@ -5,12 +5,30 @@
FROM ethereumoptimism/foundry:latest as foundry
FROM node:16-alpine3.14 as base
RUN apk --no-cache add curl jq python3 ca-certificates git make gcc musl-dev linux-headers bash build-base
RUN apk --no-cache add curl \
jq \
python3 \
ca-certificates \
git \
make \
gcc \
musl-dev \
linux-headers \
bash \
build-base \
gcompat
ENV GLIBC_KEY=https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
ENV GLIBC_KEY_FILE=/etc/apk/keys/sgerrand.rsa.pub
ENV GLIBC_RELEASE=https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
RUN wget -q -O ${GLIBC_KEY_FILE} ${GLIBC_KEY} \
&& wget -O glibc.apk ${GLIBC_RELEASE} \
&& apk add glibc.apk --force
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
COPY --from=foundry /usr/local/bin/cast /usr/local/bin/cast
# copy over the needed configs to run the dep installation
# note: this approach can be a bit unhandy to maintain, but it allows
# us to cache the installation steps
......
from alpine as build-environment
from alpine:3.14 as build-environment
WORKDIR /opt
RUN apk add clang lld curl build-base linux-headers git \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh \
......@@ -16,7 +16,7 @@ RUN source $HOME/.profile && cargo build --release \
&& strip /opt/foundry/target/release/cast \
&& strip /opt/foundry/target/release/anvil
from alpine as foundry-client
from alpine:3.14 as foundry-client
ENV GLIBC_KEY=https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
ENV GLIBC_KEY_FILE=/etc/apk/keys/sgerrand.rsa.pub
ENV GLIBC_RELEASE=https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
......
......@@ -4,6 +4,7 @@ import * as dotenv from 'dotenv'
import { ethers } from 'ethers'
// Hardhat plugins
import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
......@@ -12,7 +13,6 @@ import '@typechain/hardhat'
import 'hardhat-deploy'
import 'hardhat-gas-reporter'
import 'hardhat-output-validator'
import '@eth-optimism/hardhat-deploy-config'
// Hardhat tasks
import './tasks'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment