Skip to content

Instantly share code, notes, and snippets.

@akaron
Created February 21, 2022 06:26
Show Gist options
  • Save akaron/54c5b6cec7a4a6ad521af196f0d4d40c to your computer and use it in GitHub Desktop.
Save akaron/54c5b6cec7a4a6ad521af196f0d4d40c to your computer and use it in GitHub Desktop.
Vagrantfile_alpine312_with_docker_and_mount
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<-SCRIPT
apk add --no-cache docker && rc-update add docker boot && service docker start
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "generic/alpine312"
config.vm.synced_folder "D:\\data", "/data"
# config.vm.synced_folder "D:\\data\\data", "/var/lib/docker" # docker cannot run with use, probably issue of the filesystem format "vboxsf"
config.vm.provision "shell", inline: $script
end
# note:
# * in another test I use alpine 3.15 iso (install in virtualbox); somehow cannoot "apk add docker", need to use the following line instead:
# apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main --repository http://dl-cdn.alpinelinux.org/alpine/edge/community docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment