Comments (3)
This Vagrantfile worked for me.
Vagrant.configure(2) do |config|
config.vm.define "alpine" do |alpine|
alpine.vm.box = "maier/alpine-3.5-x86_64"
alpine.vm.synced_folder ".", "/vagrant", disabled: true
alpine.vm.provider "virtualbox" do |vb|
vb.name = 'Alpine'
vb.cpus = 2
vb.memory = 2048
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on", "--nic1", "nat", "--cableconnected1", "on"]
end
alpine.vm.provision 'shell', inline: <<-SHELL
echo "Add community repository"
echo 'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
echo "Update repositories"
apk update
echo "Install docker package"
apk add docker
echo "Enable docker service"
rc-update add docker boot
echo "Start docker service"
service docker start
SHELL
end
end
$ vagrant up
Bringing machine 'alpine' up with 'virtualbox' provider...
==> alpine: Importing base box 'maier/alpine-3.5-x86_64'...
[snip]
==> alpine: Running provisioner: shell...
alpine: Running: inline script
==> alpine: Add community repository
==> alpine: Update repositories
==> alpine: fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
==> alpine: fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
==> alpine: v3.5.2-70-gec9876f375 [http://dl-cdn.alpinelinux.org/alpine/v3.5/main]
==> alpine: v3.5.0-4623-g211cf411be [http://dl-cdn.alpinelinux.org/alpine/edge/community]
==> alpine: OK: 8490 distinct packages available
==> alpine: Install docker package
==> alpine: (1/5) Installing libmnl (1.0.4-r0)
==> alpine: (2/5) Installing libnftnl-libs (1.0.7-r0)
==> alpine: (3/5) Installing iptables (1.6.0-r0)
==> alpine: (4/5) Installing libseccomp (2.3.1-r0)
==> alpine: (5/5) Installing docker (17.04.0-r0)
==> alpine: Executing docker-17.04.0-r0.pre-install
==> alpine: Executing busybox-1.25.1-r0.trigger
==> alpine: OK: 148 MiB in 52 packages
==> alpine: Enable docker service
==> alpine: * service docker added to runlevel boot
==> alpine: Start docker service
==> alpine: * Caching service dependencies ... [ ok ]
==> alpine: * /var/log/docker.log: creating file
==> alpine: * /var/log/docker.log: correcting mode
==> alpine: * /var/log/docker.log: correcting owner
==> alpine: * Starting docker ...
==> alpine: [ ok ]
from vagrant-alpine.
Here's one with alpine 3.3, if you need to stick with that version of alpine.
Vagrant.configure(2) do |config|
config.vm.define "alpine" do |alpine|
alpine.vm.box = "maier/alpine-3.3.1-x86_64"
alpine.vm.synced_folder ".", "/vagrant", disabled: true
alpine.vm.network "private_network", ip: "172.28.128.250"
alpine.vm.synced_folder ".", "/vagrant", type: "nfs"
alpine.vm.provider "virtualbox" do |vb|
vb.name = 'Alpine'
vb.cpus = 2
vb.memory = 2048
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on", "--nic1", "nat", "--cableconnected1", "on"]
end
alpine.vm.provision 'shell', inline: <<-SHELL
echo "Add community repository"
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.3/community' >> /etc/apk/repositories
echo "Update repositories"
apk update
echo "Upgrade box"
apk upgrade
echo "Install docker package"
apk add docker
echo "Enable docker service"
rc-update add docker boot
echo "Start docker service"
service docker start
SHELL
end
end
$ vagrant up
Bringing machine 'alpine' up with 'virtualbox' provider...
==> alpine: Importing base box 'maier/alpine-3.3.1-x86_64'...
[snip]
==> alpine: Installing NFS client...
==> alpine: Exporting NFS shared folders...
==> alpine: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> alpine: Mounting NFS shared folders...
==> alpine: Running provisioner: shell...
alpine: Running: inline script
==> alpine: Add community repository
==> alpine: Update repositories
==> alpine: fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
==> alpine: fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
==> alpine: v3.3.3-258-g18e7791 [http://dl-cdn.alpinelinux.org/alpine/v3.3/main]
==> alpine: v3.3.3-196-g593fa5b [http://dl-cdn.alpinelinux.org/alpine/v3.3/community]
==> alpine: OK: 5876 distinct packages available
==> alpine: Upgrade box
==> alpine: (1/19) Upgrading musl (1.1.12-r2 -> 1.1.12-r7)
==> alpine: (2/19) Upgrading openrc (0.19-r2 -> 0.19-r4)
==> alpine: Executing openrc-0.19-r4.post-upgrade
==> alpine: (3/19) Upgrading busybox-suid (1.24.1-r7 -> 1.24.2-r1)
==> alpine: (4/19) Upgrading busybox-initscripts (2.3-r1 -> 2.3-r2)
==> alpine: (5/19) Upgrading musl-utils (1.1.12-r2 -> 1.1.12-r7)
==> alpine: (6/19) Upgrading alpine-base (3.3.1-r0 -> 3.3.3-r0)
==> alpine: (7/19) Upgrading bash (4.3.42-r3 -> 4.3.42-r6)
==> alpine: Executing bash-4.3.42-r6.post-upgrade
==> alpine: (8/19) Upgrading openssl (1.0.2f-r0 -> 1.0.2k-r0)
==> alpine: (9/19) Upgrading ca-certificates (20160104-r2 -> 20161130-r0)
==> alpine: (10/19) Upgrading libssh2 (1.6.0-r0 -> 1.6.0-r1)
==> alpine: (11/19) Upgrading curl (7.47.0-r0 -> 7.52.1-r1)
==> alpine: (12/19) Upgrading e2fsprogs-libs (1.42.13-r2 -> 1.42.13-r3)
==> alpine: (13/19) Upgrading e2fsprogs (1.42.13-r2 -> 1.42.13-r3)
==> alpine: (14/19) Upgrading cryptsetup-libs (1.7.0-r0 -> 1.7.1-r0)
==> alpine: (15/19) Upgrading mkinitfs (3.0.2-r0 -> 3.0.4-r1)
==> alpine: Executing mkinitfs-3.0.4-r1.pre-upgrade
==> alpine: Executing mkinitfs-3.0.4-r1.post-upgrade
==> alpine: (16/19) Upgrading linux-grsec (4.1.15-r2 -> 4.1.20-r0)
==> alpine: (17/19) Upgrading openssh-client (7.1_p2-r0 -> 7.2_p2-r3)
==> alpine: (18/19) Upgrading openssh-sftp-server (7.1_p2-r0 -> 7.2_p2-r3)
==> alpine: (19/19) Upgrading openssh (7.1_p2-r0 -> 7.2_p2-r3)
==> alpine: Executing busybox-1.24.2-r1.trigger
==> alpine: Executing ca-certificates-20161130-r0.trigger
==> alpine: Executing kmod-22-r0.trigger
==> alpine: Executing mkinitfs-3.0.4-r1.trigger
==> alpine: ==> initramfs: creating /boot/initramfs-grsec
==> alpine: Executing syslinux-6.03-r2.trigger
==> alpine: /boot is device /dev/sda1
==> alpine: OK: 282 MiB in 60 packages
==> alpine: Install docker package
==> alpine: (1/6) Installing iptables (1.4.21-r4)
==> alpine: (2/6) Installing expat (2.1.1-r1)
==> alpine: (3/6) Installing pcre (8.38-r1)
==> alpine: (4/6) Installing git (2.6.6-r0)
==> alpine: (5/6) Installing xz (5.2.2-r1)
==> alpine: (6/6) Installing docker (1.9.1-r2)
==> alpine: Executing docker-1.9.1-r2.pre-install
==> alpine: Executing busybox-1.24.2-r1.trigger
==> alpine: OK: 336 MiB in 66 packages
==> alpine: Enable docker service
==> alpine: * service docker added to runlevel boot
==> alpine: Start docker service
==> alpine: * Caching service dependencies ... [ ok ]
==> alpine: * /var/log/docker.log: creating file
==> alpine: * /var/log/docker.log: correcting mode
==> alpine: * /var/log/docker.log: correcting owner
==> alpine: * Starting docker ...
==> alpine: [ ok ]
from vagrant-alpine.
Worked like a charm. Thank you very much!
from vagrant-alpine.
Related Issues (20)
- alpine plugin fails on OSX when run with landrush HOT 2
- Support Alpine 3.4 ? HOT 1
- NFS client install returning a 404 HOT 13
- Can't install on LinuxMint 18 HOT 2
- Vagrant error on alpine startup HOT 3
- Does not work, in any order HOT 3
- nfs mounting problems HOT 5
- alpine 3.5 support: small mod needed HOT 1
- The following SSH command responded with a non-zero exit status??? HOT 1
- Synced Folder SMB support
- vagrant halt doesn't work HOT 2
- Problem with Docker Provisioner HOT 5
- alpine 3.6 includes virtualbox guest addition package
- resolv.conf empty HOT 2
- rsync install
- alpine 3.8 hostname doesn't accept --fqdn option HOT 5
- Could you release a new version HOT 3
- Upstreaming into official Vagrant HOT 3
- Alpine 3.10?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrant-alpine.