Skip to content

Commit

Permalink
Add docker usage examples (use-ink#333)
Browse files Browse the repository at this point in the history
* Add docker usage examples

* Default to `latest`

Follow-up for https://github.com/paritytech/ci_cd/issues/185.

* Add punctuation
  • Loading branch information
Michael Müller authored Sep 6, 2021
1 parent fbd1a4c commit f2e178d
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

# 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

# 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 \
cargo +nightly contract build --manifest-path=/sources/my_contract/Cargo.toml
```


## Usage

Expand Down

0 comments on commit f2e178d

Please sign in to comment.