Skip to main content
  1. Documentation/

Orange Pi 5 - Install Docker

2 mins

Orange Pi 5 - Install Docker #

This article describes how to install docker on an Orange Pi 5 to be used internally.

Prepare Server #

  1. Set Password
    passwd
    
  2. Set Servername
    sudo hostnamectl set-hostname spcon3xx
    
  3. Set Timezone
    sudo timedatectl set-timezone Europe/Amsterdam
    
  4. Install Software
    sudo apt update
    sudo apt install nano rsync dialog
    
  5. Install Public Key used for me
    nano ~/.ssh/authorized_keys
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDL1k4NalbkMcFDUlAbDF5zv+w3FTvEP6Uy8hk/Zn/zwSgTZ0+a4W1fgp4WOq/bARqF1PGmEqz5iHNnydzWctzm6erJzz5prmuD/EvJDWyTV7g+UpGCmq+19PUeRWLtZkbFGfeZTM4eYMQUcX8EzvbQEGHR8IU3UsV95IWl5QkGlCOIbZ+2v5e+Q3AB7n+YNHg8fA2LWwvKfBSbDaCfyyxCEjvUdorSj4J111K8YASWjFNDMZ5P19tg4FUWY89MP9iy6MwrXuM5uhgD+TG+eTgOHzdMnPeaeZgxUFzEchYvjDaA8OvdZ0sr7BiZBuGW1oBhqLvf1xwVH8oHzskEZVmzB57UnuAs68qvjuh/FCTujPOYqNbtDdMZ0eqS4ouixY0IGApULuR1NZoOS96kLRA7QCCl+eqOtynS5tyKnzsSknWQ2RL4XeZfZNigJotywKrHNrUegtCx9mXaGJ27/1IpC+ztGRbILaQpok4VbLpGZanFB5uwvYQh6p7M43Ron3E= solvinity\sdurand@SOLV8W1C3M2
    
  6. Install Public Key for GitHub Actions
    nano ~/.ssh/authorized_keys
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDVTPmJ1TGCoIpUvhBtTAHdNLdrI6fvGk2MRbz9oK4bLpsqNoxPer7kYM8BzKmaF9069LRjlUaxkwXaFuELfpSHuvtChX/EQHkQCXcOQTy6z+PTf+HCpruy/Jrbyztu2M8/52gTyJb0vV82r/WIGp0SO1ka9KDTRfQwyJZxpyK54TKzYyeecBImqjc4jerOSuMmsUJE19/1eLujA4OqciHcGz/0RthUszmNxxq2L6qPpvi+T++nLrTcpgNySIPhPOLYl7IDPHxbN1WC2n7kJNQ9PQGsg7LHw17XtJ5a8oyz4UzzKp6EX2EbIT5ywgvRWQxS5swIfCJiCTJ/+88fyKStG/Ci+E4dKTk1N8sUT+5E7jC+gIHjl9WgYfucxRauPtoN6FDBmaew/Ih+te7MyiH/+X2IALpd0TNEf0b2yEtLRhRoxC+sHsczagP+NSW8EKMDiCGqsgbK5ajG4Bc992MEjX7BtQBRZrX058s+1p8tWQ4coj+w7Ac/Zl75PW85WxM= ubuntu@spcon902
    
  7. Set Server Networking
    1. Check current netplan (and nic name)
      netplan status --all
      
    2. Set NIC to static IP’s (use nic name from step 1)
      sudo netplan set --origin-hint end1 "ethernets.end1={dhcp4: false, dhcp6: false, accept-ra: false, addresses: "[10.252.20.32/24,2a02:xxxx:xxxx:20::32/64]"}"
      
    3. Set IPv4 Route (use nic name from step 1)
      sudo netplan set ethernets.end1.routes='[{"to":"default", "via": "10.252.20.1"}]'
      
    4. Set IPv6 Route (use nic name from step 1)
      sudo netplan set ethernets.end1.routes='[{"to":"default", "via": "2a02:xxxx:xxxx:20::1"}]'
      
    5. Set DNS Suffix (use nic name from step 1)
      sudo netplan set ethernets.end1.nameservers.search="[durand.li]"
      
    6. Set DNS Servers (use nic name from step 1)
      sudo netplan set ethernets.end1.nameservers.addresses="[10.252.20.1,2a02:xxxx:xxxx:20::1]"
      
    7. Check Config
      sudo netplan get
      
    8. Apply Config
      sudo netplan apply
      
    9. Check if server is reachable

Add VLAN’s if applicable #

VLAN’s to be used by Docker, so no IP assignment. Maximum of 3 VLAN’s supported!

  1. Add VLAN (change numbers/link nic)
    sudo netplan set --origin-hint vlan12 "vlans.vlan12={id: 12, link: end1, dhcp4: false, dhcp6: false, accept-ra: false}"
    
  2. Repeat Step 1 for more VLAN’s if nescecarry
  3. Apply the config
  4. Check if server is reachable

Install and config Docker #

  1. Add Docker’s official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
  2. Add the repository to Apt sources:
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    
  3. Install Docker
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    
  4. Docker User
    sudo groupadd docker
    sudo usermod -aG docker $USER
    
  5. Enable IPv6
    sudo nano /etc/docker/daemon.json
    
  6. Add the following Config
    {
        "ipv6": true,
        "fixed-cidr-v6": "fd00::/80"
    }
    
  7. Restart Docker
    sudo systemctl restart docker
    
  8. Create Docker-Config-File directory
    mkdir ~/docker-config-files
    
  9. Reboot Server

Sources #