From 699788d79570d5bebe151fe10b34f42f6c4bdd09 Mon Sep 17 00:00:00 2001 From: Mikhail Ushanov Date: Thu, 25 Oct 2018 00:02:36 +0300 Subject: [PATCH 1/5] dockerfile: add minimal image with provisioners support Signed-off-by: Mikhail Ushanov --- Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..3a8b71364 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM ubuntu:16.04 + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && apt-get install -y \ + locales \ + openssh-server \ + sudo + +RUN locale-gen en_US.UTF-8 + +RUN if ! getent passwd vagrant; then useradd -d /home/vagrant -m -s /bin/bash vagrant; fi \ + && echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \ + && mkdir -p /etc/sudoers.d \ + && echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/vagrant \ + && chmod 0440 /etc/sudoers.d/vagrant + +RUN mkdir -p /home/vagrant/.ssh \ + && chmod 0700 /home/vagrant/.ssh \ + && wget --no-check-certificate \ + https://raw.github.com/hashicorp/vagrant/master/keys/vagrant.pub \ + -O /home/vagrant/.ssh/authorized_keys \ + && chmod 0600 /home/vagrant/.ssh/authorized_keys \ + && chown -R vagrant /home/vagrant/.ssh + +RUN mkdir -p /run/sshd + +CMD /usr/sbin/sshd -D \ + -o UseDNS=no \ + -o PidFile=/tmp/sshd.pid From 62d6cace4782f593b0b7ca8457d87a655b37e05a Mon Sep 17 00:00:00 2001 From: Mikhail Ushanov Date: Fri, 12 Oct 2018 15:33:46 +0300 Subject: [PATCH 2/5] vagrantfile: convert spaces to tabs Signed-off-by: Mikhail Ushanov --- Vagrantfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c998e31c0..7943eeba2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,9 +5,9 @@ LINUX_BASE_BOX = "bento/ubuntu-16.04" FREEBSD_BASE_BOX = "jen20/FreeBSD-12.0-CURRENT" Vagrant.configure(2) do |config| - if Vagrant.has_plugin?("vagrant-cachier") - config.cache.scope = :box - end + if Vagrant.has_plugin?("vagrant-cachier") + config.cache.scope = :box + end # Compilation and development boxes config.vm.define "linux", autostart: true, primary: true do |vmCfg| From d75bab95235379f6d4e5fe3f9884080ebdcb65b3 Mon Sep 17 00:00:00 2001 From: Mikhail Ushanov Date: Fri, 12 Oct 2018 15:34:17 +0300 Subject: [PATCH 3/5] vagrantfile: add support for docker provider Signed-off-by: Mikhail Ushanov --- Vagrantfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 7943eeba2..5f4234b33 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -73,6 +73,12 @@ def configureProviders(vmCfg, cpus: "2", memory: "2048") end end + vmCfg.vm.provider "docker" do |d, override| + d.build_dir = "." + d.has_ssh = true + override.vm.box = nil + end + return vmCfg end From 15235ce315a4774a601474c0ffbc4508dbfbeeef Mon Sep 17 00:00:00 2001 From: Mikhail Ushanov Date: Fri, 12 Oct 2018 15:35:55 +0300 Subject: [PATCH 4/5] scripts: update go version to 1.11.1 Signed-off-by: Mikhail Ushanov --- scripts/vagrant-linux-priv-go.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vagrant-linux-priv-go.sh b/scripts/vagrant-linux-priv-go.sh index 263eba370..ef5503b6e 100755 --- a/scripts/vagrant-linux-priv-go.sh +++ b/scripts/vagrant-linux-priv-go.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash function install_go() { - local go_version=1.9.2 + local go_version=1.11.1 local download= download="https://storage.googleapis.com/golang/go${go_version}.linux-amd64.tar.gz" From 4be83e20b13dddba6f0f16753506c965598bf580 Mon Sep 17 00:00:00 2001 From: Mikhail Ushanov Date: Fri, 12 Oct 2018 15:36:20 +0300 Subject: [PATCH 5/5] scripts: add gcc package for using gco on build Signed-off-by: Mikhail Ushanov --- scripts/vagrant-linux-priv-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/vagrant-linux-priv-config.sh b/scripts/vagrant-linux-priv-config.sh index d31d330c8..edbb5b8b7 100755 --- a/scripts/vagrant-linux-priv-config.sh +++ b/scripts/vagrant-linux-priv-config.sh @@ -8,6 +8,7 @@ apt-get install -y software-properties-common apt-get install -y bzr \ curl \ + gcc \ git \ make \ mercurial \