Sign inSign up

urho3d/dockerized-web

By urho3d

•Updated about 5 years ago

Web dockerized build environment for Urho3D.

Image
1

10K+

urho3d/dockerized-web repository overview

⁠Web dockerized build environment for Urho3D

This branch of the repo contains the information to build and run the Web DBE for Urho3D.

Although the main purpose of this docker image is to build Urho3D project, any Urho3D downstream projects that reuse Urho3D build system may benefit from the dockerized build environment as well. Thus, you can just simply substitute all the references to Urho3D project in the README.md with your own project.

⁠Building

You do not need to build this docker image yourself unless you want to change the default locale by building it from a custom base image using alternative locale.

$ docker build --tag=urho3d/dockerized-web .

⁠Running

The container contains the EMCC compiler toolchain which is built from Incoming branch of the Emscripten project targeting WASM by default. It can be run as below.

$ docker run -it --rm \
    --mount type=bind,source=/host-path/to/urho3D,target=/local-path/to/urho3d \
    -e PROJECT_DIR=/local-path/to/urho3d \
    -e HOST_UID=1234 -e HOST_GID=1234 \
    urho3d/dockerized-web

The container's entry point eventually calls the default command rake cmake && rake make, which is equivalent to running script/cmake_generic.sh build/web && cd build/web && make command. When the container finishes running, all the build artifacts can be found in the build tree. Other build options supported by Urho3D build system can be passed when running the container too by using "-e" flag. For example to build a module library type targeting asm.js instead, one can run the container as below.

$ docker run -it --rm \
    --mount type=bind,source=/host-path/to/urho3D,target=/local-path/to/urho3d \
    -e PROJECT_DIR=/local-path/to/urho3d \
    -e HOST_UID=1234 -e HOST_GID=1234 \
    -e URHO3D_LIB_TYPE=MODULE \
    -e EMSCRIPTEN_WASM=0 \
    urho3d/dockerized-web

⁠Running using convenient shell script in Urho3D project

To build using the default command is as simple as below.

$ script/dockerized.sh web

Tag summary

Content type

Image

Digest

Size

658.5 MB

Last updated

about 5 years ago

docker pull urho3d/dockerized-web