commit 3b4d6dc3e092ad79599c96a1669834b60512c5db Author: Guillem Hernandez Sola Date: Wed Jun 13 10:15:10 2018 +0200 Added first code diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..1f76a2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ + +# Created by https://www.gitignore.io/api/macos,vagrant,visualstudiocode + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Vagrant ### +.vagrant/ +*.box + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history + +### Ansible ### +*.retry + +# End of https://www.gitignore.io/api/macos,vagrant,visualstudiocode,ansible diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..d68a9c3 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,8 @@ +Vagrant.configure(2) do |config| + config.vm.define "docker" do |docker| + docker.vm.box = "bento/ubuntu-18.04" + docker.vm.network "private_network", ip: "192.168.11.22" + docker.vm.hostname = "docker" + docker.vm.provision :shell, :path => "docker.sh" + end +end \ No newline at end of file diff --git a/docker.sh b/docker.sh new file mode 100644 index 0000000..d2365d7 --- /dev/null +++ b/docker.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -eux +apt-get update +apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common \ + python-minimal zip python-simplejson \ + gnupg2 \ + software-properties-common +apt-get remove docker docker-engine docker.io + +curl -fsSL get.docker.com -o get-docker.sh +sh get-docker.sh + +# install docker-compose +curl -L "https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ + chmod +x /usr/local/bin/docker-compose + +# install docker-machine +curl -L "https://github.com/docker/machine/releases/download/v0.15.0/docker-machine-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-machine && \ + chmod +x /usr/local/bin/docker-machine