lib/vanagon/engine/docker.rb
def select_target
        Vanagon::Utilities.ex("#{@docker_cmd} run -d --name #{@platform.docker_image}-builder -p #{@platform.ssh_port}:22 #{@platform.docker_image}")
        @target = 'localhost'

        # Wait for ssh to come up in the container
        Vanagon::Utilities.retry_with_timeout do
          Vanagon::Utilities.remote_ssh_command("#{@target_user}@#{@target}", 'exit', @platform.ssh_port)
        end
      rescue => e
        raise Vanagon::Error.wrap(e, "Something went wrong getting a target vm to build on using docker. Ssh was not up in the container after 5 seconds.")
      end
# This method is used to obtain a vm to build upon using
# a docker container.
# @raise [Vanagon::Error] if a target cannot be obtained
This method is used to obtain a vm to build upon using
a docker container.
This method is used to obtain a vm to build upon using a docker container .
def select_target
        Vanagon::Utilities.ex("#{@docker_cmd} run -d --name #{@platform.docker_image}-builder -p #{@platform.ssh_port}:22 #{@platform.docker_image}")
        @target = 'localhost'
        Vanagon::Utilities.retry_with_timeout do
          Vanagon::Utilities.remote_ssh_command("#{@target_user}@#{@target}", 'exit', @platform.ssh_port)
        end
      rescue => e
        raise Vanagon::Error.wrap(e, "Something went wrong getting a target vm to build on using docker. Ssh was not up in the container after 5 seconds.")
      end
def select_target Vanagon :: Utilities . ex ( "#{@docker_cmd} run -d --name #{@platform.docker_image}-builder -p #{@platform.ssh_port}:22 #{@platform.docker_image}" ) @target = 'localhost' Vanagon :: Utilities . retry_with_timeout do Vanagon :: Utilities . remote_ssh_command ( "#{@target_user}@#{@target}" , 'exit' , @platform . ssh_port ) end rescue => e raise Vanagon :: Error . wrap ( e , "Something went wrong getting a target vm to build on using docker. Ssh was not up in the container after 5 seconds." ) end
This method is used to obtain a vm to build upon using
a docker container.
This method is used to obtain a vm to build upon using a docker container .
# Wait for ssh to come up in the container
[Vanagon::Error] if a target cannot be obtained
[ Vanagon :: Error ] if a target cannot be obtained