Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install docker on VyOS 1.3 rolling
# Install docker req
echo "deb buster main contrib non-free" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# Add docker repo
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] buster stable"
sudo apt-get update
# Make persistent var for docker to live between vyos upgrades
sudo mkdir -p /config/user-data/docker
sudo ln -s /config/user-data/docker /var/lib/docker
# Install docker and docker-compose
sudo apt-get install -y docker-ce docker-ce-cli
sudo curl -L "$(uname -s)-$(uname -m)" -o /config/user-data/docker/docker-compose
sudo chmod +x /config/user-data/docker/docker-compose
sudo ln -s /config/user-data/docker/docker-compose /usr/local/bin/docker-compose
# Stop docker service from autostart since we need to start manual AFTER vyos finish with iptables
sudo systemctl disable docker
# We can autostart now
echo 'systemctl start docker' >> /config/scripts/vyos-postconfig-bootup.script
# After making changes to the firewall you have to run systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.