Skip to main content
  1. Documentation/

Oracle Cloud - Ampere - Install Ubuntu/Docker

2 mins

OCI - Ampere - Install Ubuntu/Docker #

This article describes how to install Docker on Ubuntu 24.04 LTS on an Oracle Cloud.

Prepare Server #

  1. Update Software
    sudo apt update
    sudo apt upgrade
    
  2. Install Software
    sudo apt install nano rsync dialog
    
  3. 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
    
  4. Add firewall rule for Beszel
    1. Open rules.v4 in nano
      sudo nano /etc/iptables/rules.v4
      
    2. Add rule (below the ssh/22 rule)
      -A INPUT -p tcp -m state --state NEW -m tcp --dport 45876 -j ACCEPT
      
    3. Save the file
    4. Apply the new rule
      sudo iptables-restore < /etc/iptables/rules.v4
      

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 #