Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install docker on VyOS 1.3 rolling
# Install docker req
echo "deb http://deb.debian.org/debian 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 https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian 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 containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(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.