Skip to content

Instantly share code, notes, and snippets.

@buty4649
Created December 27, 2021 03:18
Show Gist options
  • Save buty4649/29d6aaa4f9e2ac7b249edc5470e82847 to your computer and use it in GitHub Desktop.
Save buty4649/29d6aaa4f9e2ac7b249edc5470e82847 to your computer and use it in GitHub Desktop.
multipass launch --cloud-init cloud-init-docker-setup.yaml
#cloud-config
timezone: Asia/Tokyo
locale: ja_JP.utf8
runcmd:
- apt-get remove -y docker docker-engine docker.io containerd runc
- apt-get update -y
- apt-get install-y ca-certificates curl gnupg lsb-release
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- apt-get update
- apt-get install -y docker-ce docker-ce-cli containerd.io
- usermod -G docker -a ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment