For development, Boxfuse can run your Apps on VirtualBox.
Boxfuse supports VirtualBox 4.2.x, 4.3.x, 5.0.x and 5.1.x running on Windows, Mac OSX or Linux.
You can control the number of CPUs exposed to the VM using the
cpus property and the number of MB of RAM using the
By default, Boxfuse assigns the same number of CPUs as the host, as well as 1024 MB of RAM to the Instance.
By default Boxfuse uses regular VirtualBox NAT where
each instance has its own network and is assigned the exact same
10.0.2.15 IP address. Instances do have the
possibility to communicate with each other, albeit only via forwarded ports (see below) on the
VirtualBox 5.1+ users also have the possibility to let Boxfuse use a NAT Network instead of regular VirtualBox NAT
by explicitly setting the
virtualbox.natnetwork Boxfuse configuration property to
Boxfuse then creates a separate VirtualBox NAT Network and all Boxfuse instances are automatically assigned
their own IP address via DHCP in the
on that network and can communicate with each other directly using their respective addresses. This is great for
microservices and client-side load balancing with Eureka.
To access the apps running on your VirtualBox instances from your physical machine, the ports of the instances must be forwarded to ports of your physical machine. Boxfuse does this automatically for you for any port defined in the image of the instance.
By default Boxfuse tries to expose the same port on your physical machine as was exposed on your instance. This
means that if your instance has a service that listens to HTTP on TCP port
8080 of your instance, Boxfuse
will then also attempt to make it available at
localhost:8080 on your physical machine. If this port is occupied,
Boxfuse will automatically select the next available port and use that instead.
You can also customize the port forwarding using the
Example: Say you have a webserver running as port
80 within the VM and would like
to be able to reach it using port
4444 on your physical machine you would configure Boxfuse like this:
> boxfuse run myapp.jar -ports.http=80 -portsmap.http=4444
To make it easy to access services running on your physical machine (outside of your Boxfuse VirtualBox instance), Boxfuse exposes an environment variable
BOXFUSE_HOST_IP to each of its VirtualBox instances. This environment variable contains the IP address of your physical machine (example: 172.27.3.61) which you can use
this to construct URLs to access your services.
To make it easy to access AWS services from your VirtualBox instances, Boxfuse automatically exposes the AWS credentials stored by the AWS CLI on your local machine to the running instances.
Boxfuse will attempt to load credentials in the following order:
You can also manually override this by explicitly setting the