How Do I Run Docker on a Spinup Linux Server?
Spinup makes it easy to launch Linux servers for development, data processing, and system administration. If you're running containerized workloads, you can also install Docker and manage containers directly on your VM.
This guide covers how to:
Install Docker on your Spinup Linux server
Handle IP conflicts with Yale’s campus network (e.g., VPN clashes)
Run containers reliably within a Yale-connected environment
Prerequisites
A running Linux server provisioned via Spinup (Ubuntu or AlmaLinux)
SSH access to the server
Sudo privileges
Step 1: Install Docker
The easiest way to get Docker running is to install from the official Docker repository.
For Ubuntu:
sudo apt update
sudo apt install -y ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
For AlmaLinux:
sudo dnf install -y dnf-utils
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
Start and enable Docker:
sudo systemctl start docker
sudo systemctl enable docker
Step 2: (Optional but Recommended) Configure Docker to Avoid IP Conflicts
By default, Docker uses the 172.16.0.0/12 IP range for its internal networking — the same range used by Yale VPN and internal resources. This can cause routing issues, especially when you're connected to campus VPN or accessing services hosted on Yale networks.
Solution: Change Docker’s Default Network Range
You can reconfigure Docker to use a different IP range that won’t overlap.
Stop Docker:
sudo systemctl stop dockerEdit the Docker daemon config:
sudo nano /etc/docker/daemon.jsonPaste the following:
{
"default-address-pools": [
{
"base": "192.168.200.0/24",
"size": 28
}
]
}This sets Docker to use subnets from 192.168.200.0/24 — a range unlikely to conflict with Yale’s infrastructure.
Restart Docker:
sudo systemctl start dockerConfirm the network is using the new range:
docker network inspect bridgeLook for:
"Subnet": "192.168.200.0/28"Step 3: Run a Test Container
Test that Docker is running properly:
docker run hello-worldYou can also test with something more interactive:
docker run -it ubuntu bashBest Practices
Avoid using 172.16.0.0/12 in Docker unless you’re sure there’s no overlap with VPN/routed IP space.
Use systemd to ensure Docker starts on boot:
sudo systemctl enable dockerFor persistent apps, consider using Docker Compose or systemd service wrappers.
Need Help?
Email: spinup@yale.edu
Slack: #spinup