Skip to content

Docker

RedTeam Subnet 61 leverages Docker to run validator nodes and miner node, packaging miner solutions as Docker images to ensure consistency and portability across different environments. This guide provides instructions on installing Docker on Linux systems and setting up a Docker Hub account.

Official pages


Setup Docker on Linux

1. Install Docker using installation script

# Download docker installer script:
curl -fsSL https://get.docker.com -o get-docker.sh
# Install docker by 'get-docker.sh' script:
DRY_RUN=1 sudo sh get-docker.sh

# Remove downloaded script:
rm -vrf get-docker.sh

2. Post-installation steps

# Check docker service status:
sudo systemctl status docker
# If docker is not running, start the docker service:
sudo systemctl start docker

# To avoid using 'sudo' for docker commands:
# Create a new 'docker' group:
sudo groupadd docker
# Add current user to the 'docker' group:
sudo usermod -aG docker $(whoami)

# Apply new group changes to the new shell session:
newgrp docker
# Or reboot the system to apply docker group changes:
sudo shutdown -r now

# Configure docker to start on reboot:
sudo systemctl enable docker.service
sudo systemctl enable containerd.service

Check docker is installed and running:

docker -v
docker info
docker images

Edit the /etc/docker/daemon.json file:

sudo nano /etc/docker/daemon.json

and add the following log-opts into the /etc/docker/daemon.json file:

{
    "log-opts":
    {
        "max-size": "10m",
        "max-file": "10"
    }
}

save changes and exit from the file editor.

# Restart docker service:
sudo systemctl restart docker.service

References