How to use this box with Vagrant:

Vagrant.configure("2") do |config|
  config.vm.box = "dominikderaprinted/alpine-docker-vbox"
  config.vm.box_version = "318.23.7012"
end
vagrant init dominikderaprinted/alpine-docker-vbox \
  --box-version 318.23.7012
vagrant up

This version was created 3 months ago.

  • alpine 3.18
  • docker 23
  • virtuabox guest additions for virtualbox 7.0.12

How to use:

Vagrant.configure("2") do |config|
  config.vm.provider "virtualbox" do |v|
    # (optional)
    v.memory = 2048
  end

  # (optional) Make life 10x easier (assuming you are the only person using that vm machine)
  config.ssh.insert_key = false

  config.vm.box = "dominikderaprinted/alpine-docker-vbox"
  config.vm.box_version = "318.23.7012"

  # (optional) Private network configuration with a static IP address
  config.vm.network "private_network", type: "static", ip: "192.168.33.100"

  # NFS settings for directory sharing
  # Mirror the host's pwd when mounting the current directory so that docker-compose just works
  config.vm.synced_folder ".", Dir.pwd, type: "nfs", nfs_udp: false
end

To connect from the host machine using docker-compose:

Add the following to ~/.ssh/config:

# vagrant vms
Host 192.168.33.100
    User vagrant 
    IdentityFile ~/.vagrant.d/insecure_private_key

Run the following in your terminal:

export DOCKER_HOST=ssh://vagrant@192.168.33.100

Test by running:

docker version

It should mention the remote (server, i.e. vm's) docker daemon version.

1 provider for this version.
  • virtualbox
    amd64 Hosted by Vagrant Cloud (369 MB)