Docker image for Mockoon GUI through noVNC.
10K+
Docker image for Mockoon GUI through noVNC.

http://localhost:80/3000/path/to/mock to port 3000X-Port-Forward: 3678 header to target a specific portPull and run the image from Docker Hub as follows:
$ docker run --rm \
-p 127.0.0.1:80:80 \
-p 127.0.0.1:3000:3000 \
-p 127.0.0.1:8080:8080 \
-e DISPLAY_WIDTH=1024 \
-e DISPLAY_HEIGHT=768 \
-e NGINX_PATHPORT=yes \
lasuillard/mockoon-novnc:main
The following endpoints are available (via NGINX):
graph LR
browser[Browser]
mockoon[Mockoon]
novnc[noVNC]
nginx[NGINX]
browser -->|http://localhost:80| nginx
browser -->|http://localhost:8080| novnc
nginx -->|/| mockoon
Once the container is up, you can access the noVNC UI at http://localhost:8080. By default, the demo mock API will be available at http://localhost:3000 (or http://localhost:80/3000 if you've enabled NGINX path-based port forwarding).
Test it with the following simple curl command:
$ curl http://localhost:3000/users
[{"id":"054bf92d-cf1f-4c66-8fc9-256a1f41c480","username":"Kaela10"},...]
Or, with NGINX path-based port forwarding enabled:
$ curl http://localhost:80/3000/users
[{"id":"054bf92d-cf1f-4c66-8fc9-256a1f41c480","username":"Kaela10"},...]
This project uses NGINX to provide path-based and header-based port forwarding features, which are useful when running multiple Mockoon environments without exposing many external ports.
Instead of binding each Mockoon port to the host, send requests like:
$ curl --fail --silent http://localhost:80/3000/path/to/mock
NGINX forwards this to port 3000 just like http://localhost:3000/path/to/mock. If no port is specified in the path, it falls back to port 3000.
Only ports in the range 3000–3999 will be forwarded; otherwise NGINX responds with 404 Not Found.
Alternatively, use the X-Port-Forward header to specify a target port without modifying the path:
$ curl --fail --silent http://localhost --header 'X-Port-Forward: 3678'
The same port range restriction (3000–3999) applies, and path-based forwarding takes precedence.
| Key | Description |
|---|---|
DISPLAY_WIDTH | noVNC display width. Defaults to 1024. |
DISPLAY_HEIGHT | noVNC display height. Defaults to 768. |
NGINX_PATHPORT | Enable NGINX path-based and header-based port forwarding. Set to "yes" to enable. Disabled by default. |
/root/.config/mockoon for Mockoon configuration and storage (persistent)/root/.config/mockoon/storage for Mockoon environments, including mock API definitions and settingsThere are known limitations so far:
Please refer to CONTRIBUTING.md for more information on how to contribute to this project.
This image was previously built on theasp/novnc.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:3977a62a4…
Size
898.5 MB
Last updated
10 days ago
docker pull lasuillard/mockoon-novnc