# Running a linux Docker container on your Mac/Win machine

**URL:** <https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223>\
**Category:** Source Code\
**Created:** [May 20, 2020, 2:12pm UTC](https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223 "2020-05-20T14:12:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [May 20, 2020, 2:12pm UTC](https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223/1 "2020-05-20T14:12:14Z")

</div>

Sometimes when we build the engine we need to run scripts (or build the engine) in a Linux environment. If you’re already on Linux, great.  
But for us that don’t use it as default, this tip is for you.

Apart from installing a VM in your favorite VM tool (we use those too!), we also use [Docker](https://www.docker.com/) and its containers.

In our scripts folder, there’s a `./scripts/docker/` folder.  
You. can build the container using:

```lua
$ ./scripts/docker/build.sh

```

And you run it like so:

```lua
$ ./scripts/docker/run.sh
builder@ubuntu:~$ 

```

This gives you access to an Ubuntu-18.04 container, with a C++ build tool chain installed. (also Java). See the [Dockerfile](https://github.com/defold/defold/blob/dev/scripts/docker/Dockerfile) for details.

It can either take folder as an argument, or you simply run the script from the folder that you wish to be your home directory.

I hope this helps someone!

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [May 20, 2020, 2:46pm UTC](https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223/2 "2020-05-20T14:46:02Z")

</div>

Actually this is a lifetime saver.  
Also there are mobile related stuff there, they could be useful when repacking or deploying(I should check them out)

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [May 20, 2020, 2:50pm UTC](https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223/3 "2020-05-20T14:50:22Z")

</div>

Definitely, we use the repack scripts all the time:

1. Bundle a test app once
2. Rebuild engine
3. Repack bundle with new exe
4. Test app
5. Go to 2.

Saves us a lot of time.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [May 20, 2020, 10:17pm UTC](https://forum.defold.com/t/running-a-linux-docker-container-on-your-mac-win-machine/65223/4 "2020-05-20T22:17:53Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> we use the repack scripts all the time

Yes, definitely a time saver when working on engine features for mobile!

It’s these scripts BTW: [defold/scripts/mobile at dev · defold/defold · GitHub](https://github.com/defold/defold/tree/dev/scripts/mobile)
