Make sshd compatible with Debian image
[discourse_docker.git] / Vagrantfile
CommitLineData
f955ef0c 1Vagrant.configure(2) do |config|
674abb40
MP
2 config.vm.provider "virtualbox" do |v|
3 v.memory = 2048
0264a3c6 4 v.cpus = 4
674abb40
MP
5 end
6
0eb22373 7 config.vm.define :dockerhost do |config|
69b0303b
HK
8 config.vm.box = "ubuntu/xenial64"
9 config.vm.network "private_network", ip: ENV["DISCOURSE_DOCKER_HOST_IP"] || "192.168.33.11"
10
11 if Vagrant.has_plugin?("vagrant-disksize")
12 config.disksize.size = ENV["DISCOURSE_DOCKER_HOST_DISKSIZE"] || "50GB"
13 else
14 raise "The vagrant-disksize plugin required to expand the vm disk size. " +
15 "Run 'vagrant plugin install vagrant-disksize'."
16 end
f955ef0c 17
0264a3c6
MP
18 if ENV["http_proxy"]
19 config.vm.provision "shell", inline: <<-EOF
20 echo "Acquire::http::Proxy \\"#{ENV['http_proxy']}\\";" >/etc/apt/apt.conf.d/50proxy
21 echo "http_proxy=\"#{ENV['http_proxy']}\"" >/etc/profile.d/http_proxy.sh
22 EOF
23 end
24
f955ef0c
MP
25 config.vm.provision "shell", inline: <<-EOF
26 set -e
27
28 export DEBIAN_FRONTEND=noninteractive
29
30 echo "en_US.UTF-8 UTF-8" >/etc/locale.gen
31 locale-gen
32 echo "Apt::Install-Recommends 'false';" >/etc/apt/apt.conf.d/02no-recommends
33 echo "Acquire::Languages { 'none' };" >/etc/apt/apt.conf.d/05no-languages
34 apt-get update
0eb22373 35 wget -qO- https://get.docker.com/ | sh
f955ef0c 36 EOF
f955ef0c
MP
37 end
38end