-
Notifications
You must be signed in to change notification settings - Fork 2
Running in Docker
martinbtm edited this page Sep 6, 2021
·
1 revision
docker build -t bytom .docker run -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latest bytomd init --chain_id <chainId>The default Bytom data directory (on the host) is:
- Mac:
~/Library/Bytom - Linux:
~/.bytom - Windows:
%APPDATA%\Bytom
docker run -it -p 9888:9888 -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latestThen you can use bytomd and bytomcli following Readme
Use exit to exit Docker's iterative mode
For example,
docker run -d -p 9888:9888 -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latest bytomd node --web.closed --auth.disableTo list the running containners and check their container id, image, corresponding command, created time, status, name and ports being used:
docker container lsor
docker psTo execute a command inside a containner, for example:
docker exec -it <containerId> bytomcli create-access-token <tokenId>To stop a running containner:
docker stop <containerId>To remove a containner:
docker rm <containerId>