# Exporting Habitat build to run in non container environments

**URL:** <https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393>\
**Category:** Habitat Help\
**Created:** [June 21, 2016, 6:42pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393 "2016-06-21T18:42:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeunito](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@jeunito](https://discourse.chef.io/u/jeunito)\
**Post date:** [June 21, 2016, 6:42pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/1 "2016-06-21T18:42:05Z")

</div>

Is it possible to export habitat builds to run in a bare metal server or a vm? Currently the only options I see for exporting are “aci”, docker and mesos.

---

<div class="post-metadata">

**Author:** ![metadave](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/metadave/32/1136_2.png) [@metadave](https://discourse.chef.io/u/metadave)\
**Post date:** [June 21, 2016, 8:46pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/2 "2016-06-21T20:46:19Z")

</div>

Hello -

yes, definitely. The only requirements we have on Linux are a 64-bit processor with a kernel greater than 2.6.32. I’d love to see an example in our docs on this, I’ll make a note for the team.

You should be able to extract a hart file w/ the `hab` executable to `/hab` or some other directory with correctly patched glibc etc. See [0] for more info on how this works under the hood.

The export commands exist because Docker + Mesos have specific packaging requirements. The source for `hab dockerize` is a great place to start if you’re curious [1], and it’s quite short and to the point.

Cheers -  
Dave

[0] [https://github.com/habitat-sh/habitat/blob/master/components/core/src/crypto/mod.rs#L123-L191](https://github.com/habitat-sh/habitat/blob/master/components/core/src/crypto/mod.rs#L123-L191)  
[1] [https://github.com/habitat-sh/habitat/blob/master/components/pkg-dockerize/bin/hab-pkg-dockerize.sh](https://github.com/habitat-sh/habitat/blob/master/components/pkg-dockerize/bin/hab-pkg-dockerize.sh)

---

<div class="post-metadata">

**Author:** ![metadave](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/metadave/32/1136_2.png) [@metadave](https://discourse.chef.io/u/metadave)\
**Post date:** [June 21, 2016, 9:09pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/3 "2016-06-21T21:09:23Z")

</div>

Hello -

These docs [0] show how to run in any environment.

Cheers -  
Dave

[0] [https://www.habitat.sh/docs/run-packages-overview/](https://www.habitat.sh/docs/run-packages-overview/)

---

<div class="post-metadata">

**Author:** ![MattRay](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mattray/32/47_2.png) [@MattRay](https://discourse.chef.io/u/MattRay)\
**Post date:** [June 22, 2016, 2:49pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/4 "2016-06-22T14:49:27Z")

</div>

The “hab pkg export mesos” is close to what you’ll probably need. It provides a tarball with the application and supervisor included. Because it’s for a mesos container, it has a bit of OS scaffolding included but you could refine it further. Take a look at

> <https://github.com/habitat-sh/habitat/blob/master/components/pkg-mesosize/bin/hab-pkg-mesosize.sh#L141>

---

<div class="post-metadata">

**Author:** ![holoway](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/holoway/32/44_2.png) [@holoway](https://discourse.chef.io/u/holoway)\
**Post date:** [June 22, 2016, 9:30pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/5 "2016-06-22T21:30:13Z")

</div>

Also, this is a for sure, slam dunk feature request. If you want to take a crack at hacking a format exporter together, we’ll be happy to help in the slack channel.

---

<div class="post-metadata">

**Author:** ![jeunito](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@jeunito](https://discourse.chef.io/u/jeunito)\
**Post date:** [June 23, 2016, 6:07pm UTC](https://discourse.chef.io/t/exporting-habitat-build-to-run-in-non-container-environments/19393/6 "2016-06-23T18:07:17Z")

</div>

Ok thanks both. I will look at these.
