Acceder a maquina virtual

  • Acceder a la docker machine de virtualbox

# listar docker machine disponibles
docker-machine ls
NAME           ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER     ERRORS
maquina-test   *        virtualbox   Running   tcp://192.168.99.101:2376           v19.03.5

# ver ayuda
docker-machine --help
Options:
...

Commands:
  active        Print which machine is active
  config        Print the connection config for machine
  create        Create a machine
  env            Display the commands to set up the environment for the Docker client
  inspect        Inspect information about a machine
  ip            Get the IP address of a machine
  kill            Kill a machine
  ls            List machines
  provision        Re-provision existing machines
  regenerate-certs    Regenerate TLS Certificates for a machine
  restart        Restart a machine
  rm            Remove a machine
  ssh            Log into or run a command on a machine with SSH.
  scp            Copy files between machines
  mount            Mount or unmount a directory from a machine with SSHFS.
  start            Start a machine
  status        Get the status of a machine
  stop            Stop a machine
  upgrade        Upgrade a machine to the latest version of Docker
  url            Get the URL of a machine
  version        Show the Docker Machine version or a machine docker version
  help            Shows a list of commands or help for one command

Run 'docker-machine COMMAND --help' for more information on a command.


# ver info de entorno para el cliente de conexion
docker-machine env maquina-test
# salida
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.101:2376"
export DOCKER_CERT_PATH="/home/usuario/.docker/machine/machines/maquina-test"
export DOCKER_MACHINE_NAME="maquina-test"
# Run this command to configure your shell: 
# eval $(docker-machine env maquina-test)

# por medio de eval $(docker-machine env maquina-test)
# se marca * de que el cliente de docker apunta la maquina virtual
  • Conexion cliente enlazado

  • Conexion por SSH

  • Eliminar Docker machine creada previamente

Última actualización

¿Te fue útil?