Code Monkey home page Code Monkey logo

docker-phpvirtualbox's Introduction

docker-phpvirtualbox

phpVirtualBox is a modern web interface that allows you to control remote VirtualBox instances - mirroring the VirtualBox GUI. This is a docker image that eases setup.

About phpVirtualBox

From the official description:

An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. phpVirtualBox is designed to allow users to administer VirtualBox in a headless environment - mirroring the VirtualBox GUI through its web interface.

Usage

This docker image is available as a trusted build on the docker index. Using this image for the first time will start a download automatically. Further runs will be immediate, as the image will be cached locally.

This image provides the phpVirtualBox web interface that communicates with any number of VirtualBox installations on your computers.

As per the above diagram the following examples assume we have two computers PC2 and PC3 in our cluster that we want to manage through a single installation of phpVirtualBox.

Applying the same scheme to any number of computers running Virtualbox should be fairly straight forward. Also, the same scheme applies if you only want to manage a single PC, which hosts both VirtualBox and this image.

Internally, the phpVirtualBox web interface communicates with each VirtualBox installation through the vboxwebsrv program that is installed as part of VirtualBox. So for every computer connected to the phpVirtualbox instance, we're going to use a minimal container that eases exposing the vboxwebsrv.

For PC2:

$ docker run -it --name=vb2 clue/vboxwebsrv [email protected]

And for PC3:

$ docker run -it --name=vb3 clue/vboxwebsrv [email protected]

This will start an interactive container that will establish a connection to the given host. To establish an encrypted SSH connection it will likely ask for your password for each user. This is the user that runs your virtual machines (VMs). See clue/vboxwebsrv for more details.

Some background: The official phpVirtualBox readme describes setting up the vboxwebsrv daemon so that it is automatically started when the machine boots up and is exposed over the network. Instead of requiring this upfront configuration, we only spawn the vboxwebsrv on demand and expose its socket only through an encrypted SSH tunnel.

In fact, if you already have your vboxwebsrv set up, you don't have to rely on the clue/vboxwebrv container. In this case, you can substitute the following link by supplying ENV variables instead. You can also pass a visual name like this:

-e VB3_PORT_18083_TCP=10.1.1.4:18083 -e VB3_NAME=MyServer

Now that all vboxwebsrv instance are up, we can link everything together and start our actual phpVirtualBox container. The recommended way to run this container looks like this:

$ docker run -d --link vb2:FirstPC --link vb3:MyLaptop -p 80:80 clue/phpvirtualbox

You can now point your webbrowser to this URL:

http://localhost

This is a rather common setup following docker's conventions:

  • -d will run a detached session running in the background
  • -p {OutsidePort}:80 will bind the webserver to the given outside port
  • --link {ContainerName}:{DisplayName} links a vboxwebsrv instance with the given {ContainerName} and exposes it under the visual {DisplayName}
  • clue/phpvirtualbox the name of this docker image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.