Skip to content

Commit

Permalink
Fix build --verifiable (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
smiasojed authored Feb 28, 2024
1 parent 79e89fe commit 2c7d7ef
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker.io/bitnami/minideb:bullseye-amd64 as slimmed-rust
# The rust version to use
ARG RUST_VERSION=stable
# The cargo contract version to use
ARG CARGO_CONTRACT_VERSION=3.1.0
ARG CARGO_CONTRACT_VERSION=3.2.0
# Url to the cargo-contract repository to install from
ARG CARGO_CONTRACT_GIT
# Branch to use in git repository
Expand Down Expand Up @@ -49,7 +49,7 @@ RUN set -eux \
&& url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" \
&& wget "$url" \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --component rust-src rustfmt --default-toolchain $RUST_VERSION \
&& ./rustup-init -y --no-modify-path --profile minimal --component rust-src rustfmt clippy --default-toolchain $RUST_VERSION \
&& rm rustup-init \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
&& rustup --version \
Expand Down
19 changes: 18 additions & 1 deletion build-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and work directory is set to `/contract`. You need to mount the folder with the
docker run -d \
--name ink-container \
--mount type=bind,source="$(pwd)",target="/contract" \
paritytech/contracts-verified
paritytech/contracts-verifiable
```

For multi-contract projects, like in the example below:
Expand All @@ -50,3 +50,20 @@ to the root contract:
It is a known issue that running AMD64 image on the ARM host architecture significantly impacts the performance
and build times. To solve this issues, enable _Use Rosetta for x86/amd64 emulation on Apple Silicon_ in
_Settings_ -> _Features in development_ tab in Docker Desktop App.

**How to debug**

Build docker image:

```bash
docker buildx build -t paritytech/contracts-verifiable:0.0.1 .
```

Run docker container:

```bash
docker container run \
-it --entrypoint /bin/bash \
--mount type=bind,source="$(pwd)",target="/contract" \
paritytech/contracts-verifiable:0.0.1
```

0 comments on commit 2c7d7ef

Please sign in to comment.