Skip to content

Commit

Permalink
Fix docker build (kripken#360)
Browse files Browse the repository at this point in the history
* Fix and document Docker build

* Fix Docker build in case the targets are not present
  • Loading branch information
fabienrohrer authored Mar 10, 2021
1 parent 46b9d20 commit a32e94b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,19 @@ On windows, you can build using cmake's
Note that if you have not installed emscripten via the emsdk, you can configure
its location with `-DEMSCRIPTEN_ROOT`.

### Building using Docker

ammo.js can also be built with [Docker](https://www.docker.com).
This offers many advantages (keeping its native environment clean, portability, etc.).
To do this, you just have to install Docker and run:

```bash
$ docker-compose build # to create the Docker image
$ docker-compose up # to create the Docker container and build ammo.js
```

If you want to add arguments to cmake, you have to edit the `docker-compose.yml` file.

Reducing Build Size
-------------------

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ services:
build: .
volumes:
- .:/code
command: sh build.sh
command: bash -c "rm -f builds/ammo.* && cmake -B builds && cmake --build builds"

0 comments on commit a32e94b

Please sign in to comment.