This repo contains dockerfiles for deployment
docker build --build-arg PHALA_GIT_TAG=master -f node.Dockerfile -t khala-node:TAG_NAME .
docker run -dti --rm --name khala-node -e NODE_NAME=my-khala-node -p 9615:9615 -p 9933:9933 -p 9944:9944 -p 30333:30333 -v $(pwd)/data:/root/data -e NODE_ROLE="FULL" khala-node:TAG_NAME
NODE_ROLE
can be ""
(empty string), "FULL"
, "VALIDATOR"
(case sensitive)
Add --no-cache
for a clean build
Start
docker start khala-node
Safe stop
docker stop khala-node
Force stop
docker kill khala-node
docker rm khala-node
docker logs khala-node
docker attach --sig-proxy=false --detach-keys=ctrl-c khala-node
docker exec -it khala-node bash
docker image prune -a
docker builder prune
docker build --build-arg PHALA_GIT_TAG=master -f node.Dockerfile -t docker.pkg.github.com/phala-network/khala-docker/khala-node:TAG_NAME .
docker push docker.pkg.github.com/phala-network/khala-docker/khala-node:TAG_NAME
docker pull docker.pkg.github.com/phala-network/khala-docker/khala-node:TAG_NAME
- Proxy and other Systemd relates configurations https://docs.docker.com/config/daemon/systemd/
- Manage Docker as a non-root user (avoid
sudo
) https://docs.docker.com/engine/install/linux-postinstall/ - You can use
docker create
instead ofdocker run
for create the container but not run it immediately - Add
--restart=unless-stopped
todocker run
to improve availability - Add
--ulimit memlock=8589934592:8589934592
and--ulimit nofile=102400:102400
for better performance - Add
--log-driver local --log-opt max-size=300m --log-opt max-file=3
for limit logs' size
This project is licensed under the terms of the MIT license.