-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target/ | ||
Dockerfile.local |
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,34 @@ | ||
FROM bridge as bridge | ||
FROM ubuntu:20.04 as wasm | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update -qq && apt-get install -y \ | ||
git \ | ||
cmake \ | ||
g++ \ | ||
pkg-config \ | ||
libssl-dev \ | ||
curl \ | ||
llvm \ | ||
clang \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH | ||
|
||
RUN curl https://sh.rustup.rs -sSf | \ | ||
sh -s -- -y --no-modify-path | ||
|
||
RUN rustup target add wasm32-unknown-unknown | ||
WORKDIR /root | ||
COPY . . | ||
RUN ./build.sh | ||
|
||
FROM node:12 | ||
ENV NEAR_ENV local | ||
RUN npm install -g near-cli | ||
COPY --from=bridge /root/.near/localnet/node0/validator_key.json . | ||
COPY --from=wasm /root/res/linkdrop.wasm . | ||
CMD ["near deploy --accountId node0 --wasmFile linkdrop.wasm --keyPath validator_key.json --nodeUrl $NODE_URL"] |