Created
November 7, 2015 08:37
-
-
Save Ara4Sh/8f6cd30d19684654aa7b to your computer and use it in GitHub Desktop.
Docker Vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An error occurred while executing the action on the 'Sys-1' | |
machine. Please handle this error then try again: | |
A Docker command executed by Vagrant didn't complete successfully! | |
The command run along with the output from the command is shown | |
below. | |
Command: ["docker", "start", "ff94ab28165a7202328db8235d6d75e569385001c81460c07088e67295a64b7e", {:notify=>[:stdout, :stderr]}] | |
Stderr: Error response from daemon: Cannot start container ff94ab28165a7202328db8235d6d75e569385001c81460c07088e67295a64b7e: [8] System error: Unit docker-ff94ab28165a7202328db8235d6d75e569385001c81460c07088e67295a64b7e.scope already exists. | |
time="2015-11-07T12:12:01+03:30" level=fatal msg="Error: failed to start one or more containers" | |
Stdout: | |
An error occurred while executing the action on the 'Sys-2' | |
machine. Please handle this error then try again: | |
A Docker command executed by Vagrant didn't complete successfully! | |
The command run along with the output from the command is shown | |
below. | |
Command: ["docker", "start", "0baefde0bb07ab7db040bc7569d6d2291fcefb502f46cfd91b959a2074493577", {:notify=>[:stdout, :stderr]}] | |
Stderr: Error response from daemon: Cannot start container 0baefde0bb07ab7db040bc7569d6d2291fcefb502f46cfd91b959a2074493577: [8] System error: Unit docker-0baefde0bb07ab7db040bc7569d6d2291fcefb502f46cfd91b959a2074493577.scope already exists. | |
time="2015-11-07T12:12:02+03:30" level=fatal msg="Error: failed to start one or more containers" | |
Stdout: | |
An error occurred while executing the action on the 'Sys-3' | |
machine. Please handle this error then try again: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.require_version ">= 1.6.0" | |
VAGRANTFILE_API_VERSION = "2" | |
CNT_NAME = "dckt-bsf" | |
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker' | |
require 'yaml' | |
containers = YAML.load_file('containers.yml') | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.ssh.username = "root" | |
config.ssh.private_key_path = "/home/araax/.ssh/id_rsa" | |
config.ssh.pty= true | |
config.vm.synced_folder ".", "/home/araax/synced", disabled: true | |
config.vm.provider "docker" do |docker| | |
docker.vagrant_vagrantfile = __FILE__ | |
end | |
containers.each do |container| | |
config.vm.define container["name"] do |node| | |
node.vm.provider "docker" do |docker| | |
docker.image = container["image"] | |
docker.name = container["name"] | |
docker.ports = container["ports"] | |
docker.has_ssh = true | |
docker.volumes = %w(/home/araax/vm/:/share) | |
docker.cmd = %w(/bin/bash) | |
end | |
end | |
end | |
config.vm.provision "shell", path: "/home/araax/vm/provision.sh", privileged: false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment