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 #
- Update Software
sudo apt update sudo apt upgrade
- Install Software
sudo apt install nano rsync dialog
- 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
- Add firewall rule for Beszel
- Open rules.v4 in nano
sudo nano /etc/iptables/rules.v4
- Add rule (below the ssh/22 rule)
-A INPUT -p tcp -m state --state NEW -m tcp --dport 45876 -j ACCEPT
- Save the file
- Apply the new rule
sudo iptables-restore < /etc/iptables/rules.v4
- Open rules.v4 in nano
Install and config Docker #
- 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
- 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
- Install Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Docker User
sudo groupadd docker sudo usermod -aG docker $USER
- Enable IPv6
sudo nano /etc/docker/daemon.json
- Add the following Config
{ "ipv6": true, "fixed-cidr-v6": "fd00::/80" }
- Restart Docker
sudo systemctl restart docker
- Create Docker-Config-File directory
mkdir ~/docker-config-files
- Reboot Server