Step 6: Run the application
Packaging System Demo
Now that the build is complete, let's test it out by running the package. Two common ways of running a package include:
- Start services directly from the Studio* using the Habitat Supervisor, or
- Export the .hart to a Docker image and use docker run.
We've mentioned the benefits of Habitat's export capabilities, so let's see how how that works now. With a single command, you will have exported the .hart file as a Docker image.
After the export finishes, exit the studio (or open a new terminal window in the same location) and run the Docker container.
*On some operating systems, the Habitat Studio runs as Docker container, so if you wanted to view a sample application running within a Studio, you'd need to expose a port using one of Habitat's environment variables.
Preview the application in your browser
Finally, go to http://localhost:8000 in your browser to see the sample application UI (screenshot below).