From 846539058f0c2854f57105fc6635521f55996269 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Wed, 25 Aug 2021 09:25:35 +0200 Subject: [PATCH 1/3] Add docker usage examples --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 56c6882e..125d163c 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,23 @@ More relevant links: ### Docker Image -If you'd prefer to use Docker instead we have a Docker image [available on the Docker Hub](https://hub.docker.com/r/paritytech/contracts-ci-linux) -which contains the dependencies needed to build `cargo-contract`, as well as -a pre-built `cargo-contract` binary which you can just execute. +If you prefer to use Docker instead we have a Docker image +[available on the Docker Hub](https://hub.docker.com/r/paritytech/contracts-ci-linux): + +```bash +# Pull the latest image +docker pull paritytech/contracts-ci-linux:production + +# Create a new contract in your current directory +docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux:production \ + cargo +nightly contract new --target-dir /sources my_contract + +# Build the contract. This will create the contract file under +# `my_contract/target/ink/my_contract.contract`. +docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux:production \ + cargo +nightly contract build --manifest-path=/sources/my_contract/Cargo.toml +``` + ## Usage -- GitLab From d6fec5afd1be24d4386ed702ae65b4cdbc19d2a3 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Thu, 26 Aug 2021 11:05:25 +0200 Subject: [PATCH 2/3] Default to `latest` Follow-up for https://github.com/paritytech/ci_cd/issues/185. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 125d163c..fb472c75 100644 --- a/README.md +++ b/README.md @@ -58,15 +58,15 @@ If you prefer to use Docker instead we have a Docker image ```bash # Pull the latest image -docker pull paritytech/contracts-ci-linux:production +docker pull paritytech/contracts-ci-linux # Create a new contract in your current directory -docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux:production \ +docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux \ cargo +nightly contract new --target-dir /sources my_contract # Build the contract. This will create the contract file under # `my_contract/target/ink/my_contract.contract`. -docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux:production \ +docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux \ cargo +nightly contract build --manifest-path=/sources/my_contract/Cargo.toml ``` -- GitLab From 9aba67910e630dbcbe923400ee71af31f8b2f175 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Mon, 6 Sep 2021 17:50:38 +0200 Subject: [PATCH 3/3] Add punctuation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fb472c75..960db82e 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ If you prefer to use Docker instead we have a Docker image [available on the Docker Hub](https://hub.docker.com/r/paritytech/contracts-ci-linux): ```bash -# Pull the latest image +# Pull the latest image. docker pull paritytech/contracts-ci-linux -# Create a new contract in your current directory +# Create a new contract in your current directory. docker run --rm -it -v $(pwd):/sources paritytech/contracts-ci-linux \ cargo +nightly contract new --target-dir /sources my_contract -- GitLab