Skip to content

costoxff/raylib-docker-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Images for Raylib Web Developement

Provide out-of-the-box simple web developed environment for raylib developers

Dependency

Of course the Docker Engine , following the offical installation.

May be podman can be considered too

How to start

First let me show the directory structure.

.
├── build.sh
├── Dockerfile
├── game
├── README.md
└── run-env.sh
file/dir remark
Dockerfile how to build the raylib web env
build.sh build the raylib web env
run-env.sh run the raylib web env
README.md a markdown file
game a raylib game template

1. build & run

Running the command below to build the docker images.

./build.sh

While building successfully, you can run the command:

./run-env.sh

If you want to install something packages in runing container, please remove flag --rm in run-env.sh

After that your working directory will be /home/user/game which the host directory game has been mounted.

2. Building Project

The common way to build with cmake.

(a.)

mkdir build && cd build

(b.)

emcmake will define -DCMAKE_TOOLCHAIN_FILE -DCMAKE_CROSSCOMPILING_EMULATOR for cmake. Always adding emcmake before cmake command.

emcmake cmake ..

(c.)

The cmake will generate Makefile, so just make it

make

You will finally find the compiled file index.html in web directory.

3. Test it with python simple http server

The directory has been mounted, so be free to running this command in docker or your host machine.

Running the command below in web directory.

python3 -m http.server

open your browser and visit http://localhost:8000

Future Work

  • Specify raylib version when building docker image
  • Specify emsdk version when building docker image
  • Minimize the image size

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published