Giter VIP home page Giter VIP logo

zepkit-dockerfile's Introduction

Setup for Zepkit Demo Docker Image by Ivan Martinez

Following the demo

https://zepkit.zeppelinos.org/

0. Clone this github

git clone https://github.com/IvanTheGreatDev/ZepKit-Dockerfile cd ZepKit-Dockerfile

1. Build the Docker image (This may take a few minutes).

./build

2. Run the Docker image (This may take a few minutes).

docker run -d --rm --name=zepkit -it zepkit

3. Once that completes and you see a terminal, exit the process.

ctrl + c

4. Copy the contracts segment of the docker so you can edit it locally.

mkdir zeppelin

docker cp zepkit:/zeppelin/contracts $PWD/zeppelin

5. Kill the terminal after copying from it

docker kill zepkit

6. Restart it again but this time mount it locally

./run

7. Start ganache to use it as a test network

docker exec -i zepkit ganache-cli --secure -u 0 -u 1 -u 2 --deterministic -h 0.0.0.0

Note: You can use the command below to check your currently running Docker images

docker ps

8. Start the web server in it's own container as well (give it a few seconds to actually start)

docker exec -d zepkit /bin/sh -c 'cd client/ && npm run start'

Following the guide on http://localhost:3000/counter

1. Go to http://localhost:3000/counter and follow those instructions. (skip the ganache-cli step) but for all zos commands, use ./dzos instead.

For example: zos init zepkit

Becomes: ./dzos init zepkit

This forwards your command to the docker container using docker exec

2. For the session command follow these instructions.

You can view the ganache container logs with docker logs zepkit_ganache

And then set the from address as the top address from the ganache logs

./dzos session --network development --from ADDRESS_FROM_GANACHE --expires 3600

3. For the segment of editing your contract edit your local files you cloned earlier

Using the Dockerfile for your own personal Zepkit project

1. If you haven't, build the Docker image (This may take a few minutes).

./build

2. Run the Docker image (This may take a few minutes).

docker run -d --rm --name=zepkit -it zepkit

3. Once that completes and you see a terminal, exit the process.

ctrl + c

4. Copy the entire project from the docker so you can edit it locally.

mkdir zeppelin

docker cp zepkit:/zeppelin/ $PWD/

5. Kill the terminal after copying from it

docker kill zepkit

6. Restart it again but this time mount everything locally

docker run -p 8545:8545 -p 3000:3000 -d -v $PWD/zeppelin/:/zeppelin/ --name=zepkit -it zepkit

7. Clean the project so you can start fresh

docker exec zepkit npm run start-blank

8. Start the web server in it's own container as well (give it a few seconds to actually start)

docker exec -d zepkit /bin/sh -c 'cd client/ && npm run start'

9. Start ganache to to use as a test network

docker exec -i zepkit ganache-cli --secure -u 0 -u 1 -u 2 --deterministic -h 0.0.0.0

If anything goes wrong during setup or you want to start clean

Kills all running docker containers

./clean

If for any reason you need to manually get into the docker terminal

./openTerm

zepkit-dockerfile's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.