-
Notifications
You must be signed in to change notification settings - Fork 2
/
contracts.dapp.dockerfile
28 lines (27 loc) · 1.16 KB
/
contracts.dapp.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ARG BASE=paritytech
ARG TAG=latest
FROM ${BASE}/contracts-ci-linux:${TAG} as builder
RUN mkdir -p /usr/src/docker
COPY ./docker/contracts.deploy.dapp.sh /usr/src/docker/
COPY ./docker/contracts.deploy.contract.sh /usr/src/docker/
COPY ./dapp-example/contracts/ /usr/src/build/contracts
ENV SUBSTRATE_ENDPOINT=ws://substrate-node
ENV SUBSTRATE_PORT=9944
ENV DEPLOYER_SURI=//Alice
ENV DAPP_CONTRACT_SOURCE=/usr/src/dapp-example/contracts
ENV DAPP_CONTRACT_WASM=./target/ink/dapp.wasm
ENV DAPP_CONTRACT_CONSTRUCTOR=new
ENV DAPP_CONTRACT_ARGS_INITIAL_SUPPLY=1000000000000000000000
ENV DAPP_CONTRACT_ARGS_FAUCET_AMOUNT=1000000
ENV DAPP_CONTRACT_ARGS_HUMAN_THRESHOLD=80
ENV DAPP_CONTRACT_ARGS_RECENCY_THRESHOLD=180000
ENV DAPP_CONTRACT_ENDOWMENT=1000000000000
WORKDIR /usr/src/dapp/contracts
RUN echo $(ls -lah /usr/src/build/contracts)
WORKDIR /usr/src/build/contracts
#RUN cargo +nightly contract build
ARG ARCHITECTURE=x86_64
RUN /usr/local/rustup/toolchains/nightly-${ARCHITECTURE}-unknown-linux-gnu/bin/cargo metadata --format-version 1 --manifest-path Cargo.toml
WORKDIR /usr/src
RUN chmod +x /usr/src/docker/contracts.deploy.dapp.sh
CMD ["bash", "/usr/src/docker/contracts.deploy.dapp.sh"]