Skip to content

Commit

Permalink
Add option to compile ffishjs in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfab committed Sep 13, 2024
1 parent d3e9bd9 commit fbde758
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ Make sure that the wasm file is in the `public` directory.
Reference: [emscripten/#10114](https://github.com/emscripten-core/emscripten/issues/10114)
### Compile in docker
Instead of installing emscripten natively you can also run the compilation in docker from this directory using e.g.
```bash
DOCKER_USER=$(id -u):$(id -g) docker compose run --rm emscripten make -f Makefile_js build es6=yes
```
## Instructions to run the tests
```bash
npm install
Expand Down
15 changes: 15 additions & 0 deletions tests/js/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3.7"

services:
# https://github.com/emscripten-core/emsdk/blob/main/docker/README.md
emscripten:
image: emscripten/emsdk:1.39.16
# Allow writing to host filesystem as non-root
user: ${DOCKER_USER:-1000:1000}
working_dir: /app/src
volumes:
- ../..:/app
- emscripten-cache:/emsdk/upstream/emscripten/cache

volumes:
emscripten-cache:

0 comments on commit fbde758

Please sign in to comment.