Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
wget unzip php5-cli

# install phpvirtualbox
RUN wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip/download -O phpvirtualbox-4.3-1.zip
RUN unzip phpvirtualbox-4.3-1.zip
RUN mv phpvirtualbox-4.3-1 /var/www
RUN wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-3.zip/download -O phpvirtualbox-4.3-3.zip
RUN unzip phpvirtualbox-4.3-3.zip
RUN mv phpvirtualbox-4.3-3 /var/www
ADD config.php /var/www/config.php
RUN chown www-data:www-data -R /var/www

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ To establish an encrypted SSH connection it will likely ask for your password fo
> supplying ENV variables instead. You can also pass a visual name like this:
>
> ```bash
> -e VB3_PORT_18083_TCP=10.1.1.4:18083 -e VB3_NAME=MyServer
> -e VB3_PORT_18083_TCP=10.1.1.4:18083 -e VB3_NAME=MyServer -e VB3_USER=VirtualBoxUserName -e VB3_PASSWORD=VirtualBoxUserPassword
> ```

Now that all `vboxwebsrv` instance are up, we can link everything together and start our actual phpVirtualBox container.
Expand Down
7 changes: 5 additions & 2 deletions servers-from-env.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

// actual readable name is stored as "/thiscontainer/givencontainer"
$name = getenv($prefix . '_NAME');
$user = getenv($prefix . '_USER');
$pass = getenv($prefix . '_PASSWORD');

$pos = strrpos($name, '/');
if ($pos !== false) {
$name = substr($name, $pos + 1);
Expand All @@ -27,8 +30,8 @@

$servers []= array(
'name' => $name,
'username' => 'username',
'password' => 'password',
'username' => false === $user ? 'username' : $user,
'password' => false === $pass ? 'password' : $pass,
'authMaster' => true,
'location' => $location
);
Expand Down