Dockerfile.terra 937 B

12345678910111213141516171819202122232425
  1. # This is a multi-stage docker file, first stage builds contracts
  2. # And the second one creates node.js environment to deploy them
  3. FROM cosmwasm/workspace-optimizer:0.12.1@sha256:1508cf7545f4b656ecafa34e29c1acf200cdab47fced85c2bc076c0c158b1338 AS builder
  4. COPY terra/Cargo.lock /code/
  5. COPY terra/Cargo.toml /code/
  6. COPY terra/contracts /code/contracts
  7. COPY terra/packages /code/packages
  8. COPY third_party/pyth /third_party/pyth
  9. RUN optimize_workspace.sh
  10. # Contract deployment stage
  11. FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546
  12. RUN apt update && apt install netcat curl jq -y
  13. WORKDIR /app/tools
  14. COPY --from=builder /code/artifacts /app/artifacts
  15. COPY ./terra/artifacts/cw20_base.wasm /app/artifacts/
  16. COPY ./terra/tools/package.json ./terra/tools/package-lock.json /app/tools/
  17. RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
  18. npm ci
  19. COPY ./terra/tools /app/tools