Skip to content

Commit

Permalink
unify 4 dockerfiles into a single Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Nov 14, 2023
1 parent 9b9853c commit 7f8bd9a
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 57 deletions.
44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### image to contribute, verify, finish ceremonies
FROM node AS zk-voceremony

WORKDIR /app

RUN npm config set update-notifier false && \
npm install -g snarkjs

RUN apt update \
&& apt install --no-install-recommends -y curl \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt install --no-install-recommends -y git-lfs \
&& git lfs install \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install --no-install-recommends -y gh \
&& apt autoremove -y \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

ENTRYPOINT [ "bash" ]

### image to create ceremonies
FROM node AS zk-voceremony-creator

WORKDIR /app

RUN apt update && apt install --no-install-recommends -y -q build-essential curl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

ENV PATH="/root/.cargo/bin:${PATH}"

RUN mkdir -p /temp && cd /temp && \
git clone https://github.com/iden3/circom.git && \
cd circom && \
cargo build --release && \
cargo install --path circom && \
npm config set update-notifier false && \
npm install -g snarkjs circomlib

ENTRYPOINT [ "bash", "./scripts/create-ceremony.sh" ]
20 changes: 0 additions & 20 deletions dockerfiles/contribute-ceremony.dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions dockerfiles/create-ceremony.dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions dockerfiles/finish-ceremony.dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions dockerfiles/verify-contribution.dockerfile

This file was deleted.

0 comments on commit 7f8bd9a

Please sign in to comment.