2022-06-16 09:48:01 -07:00
|
|
|
# This is a multi-stage docker file:
|
|
|
|
# 1. The first stage builds the contracts
|
|
|
|
# 2. The second is an empty image with only the wasm files (useful for exporting)
|
|
|
|
# 3. The third creates a node.js environment to deploy the contracts to devnet
|
2023-08-10 07:08:22 -07:00
|
|
|
FROM cosmwasm/workspace-optimizer:0.13.0@sha256:d868e239f73fb45ba98dd088c0a6a15effd0b87b7b193701f02c3913ecb8a196 AS builder
|
2022-12-14 09:06:45 -08:00
|
|
|
|
|
|
|
COPY cosmwasm/Cargo.lock /code/
|
|
|
|
COPY cosmwasm/Cargo.toml /code/
|
|
|
|
COPY cosmwasm/contracts /code/contracts
|
|
|
|
COPY cosmwasm/packages /code/packages
|
2022-12-12 15:43:22 -08:00
|
|
|
COPY cosmwasm/artifacts /code/artifacts
|
2022-12-14 09:06:45 -08:00
|
|
|
COPY sdk/rust /sdk/rust
|
2022-06-16 09:48:01 -07:00
|
|
|
|
2023-12-06 11:26:52 -08:00
|
|
|
RUN --mount=type=cache,target=/target,id=cosmwasm_target --mount=type=cache,target=/usr/local/cargo/registry optimize_workspace.sh
|
2022-06-16 09:48:01 -07:00
|
|
|
|
|
|
|
FROM scratch as artifacts
|
|
|
|
COPY --from=builder /code/artifacts /
|