I’m having difficulty running a Docker containerized testnet node on latest master of the ic repository on GitHub. Steps I’m performing:
-
cp ic-os/scripts/build-container.sh ic-os/guest-os/scripts/
This appears to be in the wrong directory - Hardcode the value of
BASE_IMAGE=dfinity/[email protected]:c8de9496654ddad9d4b337f07f19dfe780d6449323fb9223b254d21039a07c57
in ic-os/guestos/rootfs/Dockerfile - Now this builds successfully with
./ic-os/guestos/scripts/build-container.sh ic-testnet-image
- I create a node configuration file:
./ic-os/guestos/scripts/build-bootstrap-config-image.sh -t ic-bootstrap.tar --ipv6_address 2001:3984:3989::10/64 --ipv6_gateway 2001:3984:3989::1 --hostname testnode-1 --name_servers "8.8.8.8 1.1.1.1"
- To configure the docker runtime environment, I use a docker compose configuration docker-compose.yml:
version: "3.9"
services:
test_node_1:
image: "ic-testnet-image"
container_name: test_node_1
tmpfs:
- /run
- /tmp:exec
- /run/lock
volumes:
- type: bind
source: /sys/fs/cgroup
target: /sys/fs/cgroup
- type: bind
source: ./ic-bootstrap.tar
target: /mnt/ic-bootstrap.tar
networks:
enp1s0:
ipv6_address: 2001:3984:3989::10
networks:
enp1s0:
ipam:
driver: default
config:
- subnet: "2001:3984:3989::/64"
- gateway: "2001:3984:3989::1"
- Run with
docker compose up
and I attach to the running container:docker exec -it <container_id> /bin/bash
and runjournalctl -xe
to get service logs. bootstrap-ic-node.service exits with code 0 and reports success:
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device loop6
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device loop7
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device sda
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device sda1
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device sda14
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[37]: Consider device sda15
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[35]: Processing bootstrap config
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[35]: Setting up network.conf
May 11 05:08:29 755cd5de9a6a bootstrap-ic-node.sh[35]: Successfully processed bootstrap config
May 11 05:08:29 755cd5de9a6a systemd[1]: Finished Bootstrap the IC node.
However, it appears that ic-replica.service is never started. When I start it manually with systemctl start ic-replica.service
, it fails:
May 11 05:08:40 755cd5de9a6a chronyd[66]: Selected source 135.125.169.44
May 11 05:08:41 755cd5de9a6a chronyd[66]: Selected source 23.237.58.121
May 11 05:09:17 755cd5de9a6a systemd[1]: Starting of /sys/subsystem/net/devices/enp1s0 not supported.
-- Subject: A start job for unit sys-subsystem-net-devices-enp1s0.device has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit sys-subsystem-net-devices-enp1s0.device has finished with a failure.
--
-- The job identifier is 155 and the job result is unsupported.
May 11 05:09:17 755cd5de9a6a systemd[1]: Dependency failed for IC replica.
-- Subject: A start job for unit ic-replica.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit ic-replica.service has finished with a failure.
--
-- The job identifier is 107 and the job result is dependency.
Any thoughts on network configuration, how I should expect ic-replica.service to run, or any references to running testnet nodes as Docker containers?
This doc describes “[Docker containerization] allows booting an entire testnet on a laptop far faster than a VM deployment.” This is what I am trying to achieve.
It may be helpful to open source the testnet/docs/HowTo-OperateNetworks.adoc file that is referenced here as a GitLab link, but isn’t present in GitHub.