Skip to content

Commit

Permalink
docs: update README with Docker instructions, pin Solang image to 0.3.3
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <[email protected]>
  • Loading branch information
tareknaser committed Jun 17, 2024
1 parent 4e14ca1 commit 3e8f28b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ script = '''
npm install
'''

[tasks.deps-docker]
script = '''
docker pull ghcr.io/hyperledger/solang:v0.3.3
'''

[tasks.deps]
dependencies = ["deps-wasm", "deps-npm"]
dependencies = ["deps-wasm", "deps-npm", "deps-docker"]

[tasks.build-server]
script = '''
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ The Dockerfile for Solang Playground relies on Nestybox's Sysbox runtime. This h

Here are the [instructions to install Sysbox](https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-package.md#installing-sysbox)

### Building the Docker Image
### Building the Docker Image Locally

```sh
docker build -t solang-playground .
```

You can then run the image with:

```sh
cargo make docker-run
```

The docker image is also available on Docker Hub:

```sh
Expand Down
4 changes: 2 additions & 2 deletions crates/backend/src/services/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ pub fn build_compile_command(input_file: &Path, output_dir: &Path) -> Command {
mount_output_dir.push(DOCKER_OUTPUT);
cmd.arg("--volume").arg(&mount_output_dir);

// Using the latest solang image
cmd.arg(format!("{}:latest", DOCKER_IMAGE_BASE_NAME));
// Using the solang image version v0.3.3
cmd.arg(format!("{}:v0.3.3", DOCKER_IMAGE_BASE_NAME));

// Building the compile command
let remove_command = format!("rm -rf {}*.wasm {}*.contract", DOCKER_OUTPUT, DOCKER_OUTPUT);
Expand Down
4 changes: 2 additions & 2 deletions sysbox/on-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
dockerd > /var/log/dockerd.log 2>&1 &
sleep 2

# pull latest solang image
docker pull ghcr.io/hyperledger/solang:latest
# pull solang image version v0.3.3
docker pull ghcr.io/hyperledger/solang:v0.3.3

# start backend server
./app/target/release/backend --port 9000 --host 0.0.0.0 --frontend_folder /app/packages/app/dist

0 comments on commit 3e8f28b

Please sign in to comment.