Skip to content

Commit

Permalink
fix(docker):add cflag to avoid build errors (foundry-rs#3514)
Browse files Browse the repository at this point in the history
Co-authored-by: Genysys <112424909+samtvlabs@users.noreply.github.com>
  • Loading branch information
Genysys and distributedstatemachine authored Oct 20, 2022
1 parent 3858d18 commit d896050
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM alpine AS build-environment
FROM alpine as build-environment
ENV CFLAGS=-mno-outline-atomics
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 \
&& chmod +x ./rustup.sh \
&& ./rustup.sh -y

WORKDIR /opt/foundry
COPY . .
RUN source $HOME/.profile && cargo build --release \
&& strip /opt/foundry/target/release/forge \
&& strip /opt/foundry/target/release/cast \
&& strip /opt/foundry/target/release/anvil

FROM alpine AS foundry-client
FROM alpine 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
Expand Down

0 comments on commit d896050

Please sign in to comment.