forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move guardian-set-init.sh to docker/tilt
- Loading branch information
1 parent
18f8337
commit 0a7168c
Showing
6 changed files
with
166 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ target | |
/mutagen.sh | ||
venv | ||
.env | ||
.env.hex | ||
.env.0x | ||
bigtable-admin.json | ||
bigtable-writer.json | ||
**/cert.pem | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2 | ||
FROM docker.io/fedora:34 AS const-build | ||
|
||
ARG num_guardians | ||
ENV NUM_GUARDIANS=$num_guardians | ||
|
||
# add additional root CAs | ||
COPY cert.pem* /certs/ | ||
RUN if [ -e /certs/cert.pem ]; then cp /certs/cert.pem /etc/pki/tls/certs/ca-bundle.crt; fi | ||
|
||
# fetch scripts/guardian-set-init.sh deps | ||
RUN dnf -y install jq | ||
|
||
# fetch clients/** deps | ||
RUN curl -fsSL https://rpm.nodesource.com/setup_16.x | bash - && dnf -y install nodejs | ||
|
||
# configure node & npm to work with custom root CAs | ||
ENV NODE_EXTRA_CA_CERTS=/certs/cert.pem | ||
ENV NODE_OPTIONS=--use-openssl-ca | ||
RUN if [ -e /certs/cert.pem ]; then npm config set cafile /certs/cert.pem; fi | ||
|
||
# install token_bridge deps & build | ||
WORKDIR /clients/token_bridge | ||
# copy package.json & package-lock.json by themselves to create a cache layer | ||
COPY clients/token_bridge/package.json clients/token_bridge/package-lock.json ./ | ||
# mount the buildkit cache on npm's cache dir, install dependencies | ||
RUN --mount=type=cache,target=/root/.npm npm ci | ||
# copy the rest of the source files, as a layer on top of the deps | ||
COPY clients/token_bridge ./ | ||
RUN npm run build | ||
|
||
# install nft_bridge deps & build | ||
WORKDIR /clients/nft_bridge | ||
COPY clients/nft_bridge/package.json clients/nft_bridge/package-lock.json ./ | ||
RUN --mount=type=cache,target=/root/.npm npm ci | ||
COPY clients/nft_bridge ./ | ||
RUN npm run build | ||
|
||
WORKDIR / | ||
|
||
COPY scripts ./scripts | ||
COPY ethereum/.env.test ./ethereum/.env.test | ||
|
||
# run guardian-set-init.sh to create env files with the init state for NUM_GUARDIANS | ||
RUN ./scripts/guardian-set-init.sh $NUM_GUARDIANS | ||
|
||
FROM scratch AS const-export | ||
COPY --from=const-build /scripts/.env.0x ethereum/.env | ||
COPY --from=const-build /scripts/.env.hex solana/.env | ||
COPY --from=const-build /scripts/.env.hex terra/tools/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters