Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build --verifiable command #1511

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a strange tag. Where does 0.0.1 come from?

Copy link
Collaborator Author

@smiasojed smiasojed Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've set a tag to differentiate the locally built image from the one downloaded. It can be any tag, do you want to change it?
maybe: paritytech/contracts-verifiable:0.0.1-local

```

Run docker container:

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