2020-12-03 05:37:23 -08:00
|
|
|
# This is a multi-stage docker file, first stage builds contracts
|
|
|
|
# And the second one creates node.js environment to deploy them
|
2021-01-19 07:15:54 -08:00
|
|
|
FROM cosmwasm/workspace-optimizer:0.10.4@sha256:a976db4ee7add887a6af26724b804bbd9e9d534554506447e72ac57e65357db9 AS builder
|
2020-12-03 05:37:23 -08:00
|
|
|
ADD Cargo.lock /code/
|
|
|
|
ADD Cargo.toml /code/
|
|
|
|
ADD contracts /code/contracts
|
|
|
|
RUN optimize_workspace.sh
|
|
|
|
|
|
|
|
# Contract deployment stage
|
2021-07-05 04:17:07 -07:00
|
|
|
FROM python:slim-buster@sha256:ec7a755e6313da2f7db02d8e82f6b0813b176f06c5622174c8ab45feefc8096d
|
2020-12-03 05:37:23 -08:00
|
|
|
|
2021-07-05 04:17:07 -07:00
|
|
|
RUN apt update && apt install netcat curl jq -y
|
2020-12-03 05:37:23 -08:00
|
|
|
|
|
|
|
WORKDIR /app/tools
|
|
|
|
|
|
|
|
COPY --from=builder /code/artifacts /app/artifacts
|
|
|
|
ADD ./artifacts/cw20_base.wasm /app/artifacts/
|
|
|
|
ADD ./tools /app/tools
|
|
|
|
|
|
|
|
RUN chmod +x /app/tools/deploy.sh
|
|
|
|
|
2021-07-05 04:17:07 -07:00
|
|
|
RUN pip install -r /app/tools/requirements.txt
|
2020-12-03 05:37:23 -08:00
|
|
|
|
2021-01-19 07:15:54 -08:00
|
|
|
ENTRYPOINT /app/tools/deploy.sh
|