3

How does one install eos using npm, without going the route of docker image install? In other words, is there a workaround for installing without using the following docker command: docker pull eosio/eos-dev?

3
  • are you just looking for an alternative to docker or an alternative way to install and still use docker?
    – Don
    Sep 14, 2018 at 23:27
  • is there an alternative to docker install, Sep 15, 2018 at 20:51
  • @user2243 If the answer below solved your issue, please mark it as accepted. Thanks!
    – Don
    Oct 15, 2018 at 21:56

1 Answer 1

3

You can't install eosio using npm.

If you're looking for an alternative way to install & run a development environment using Docker you can follow the instructions for Docker-compose below. You can also choose a different build option altogether, I've added one below the Docker instructions:

git clone https://github.com/EOSIO/eos.git --recursive --depth 1

cd eos/Docker

docker build . -t eosio/eos

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.0.0 tag, you could do the following:

docker build -t eosio/eos:v1.0.0 --build-arg branch=v1.0.0

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.

docker build -t eosio/eos --build-arg symbol=ABC

Start nodeos docker container only

docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e arg1 arg2

By default, all data is persisted in a docker volume. It can be deleted if the data is outdated or corrupted:

$ docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' nodeos fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc

$ docker volume rm fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc

Alternately, you can directly mount host directory into the container

docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e arg1 arg2

Get chain info

curl http://127.0.0.1:8888/v1/chain/get_info

Start both nodeos and keosd containers

docker volume create --name=nodeos-data-volume

docker volume create --name=keosd-data-volume

docker-compose up -d

If you are looking for an alternative to Docker altogether there are several build options available with instructions on the dev documentation site

After cloning the repo:

Run the build script from the eos folder.

cd eos

./eosio_build.sh

After the script has completed, install EOSIO

./eosio_install.sh

For ease of contract development, content can be installed in the /usr/local folder using the make install target. This step is run from the build folder. Adequate permission is required to install.

cd build

sudo make install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.