{"id":20187421,"url":"https://github.com/humbertodias/docker-sdl-compiler","last_synced_at":"2025-09-21T19:31:33.747Z","repository":{"id":193927854,"uuid":"689745618","full_name":"humbertodias/docker-sdl-compiler","owner":"humbertodias","description":"Docker container sdl-compiler with SDL 1/2/3 + empscripten + tools to compile a C/C++ project","archived":false,"fork":false,"pushed_at":"2025-07-27T18:30:47.000Z","size":71,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T18:30:28.736Z","etag":null,"topics":["docker","sdl2","sdl2-image","sdl2-mixer","sdl2-ttf","sdl3"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/hldtux/sdl-compiler","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humbertodias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-10T19:13:22.000Z","updated_at":"2025-07-27T18:30:51.000Z","dependencies_parsed_at":"2023-09-10T20:37:31.021Z","dependency_job_id":"d84dc810-13aa-4185-a8b3-e2216a51e619","html_url":"https://github.com/humbertodias/docker-sdl-compiler","commit_stats":null,"previous_names":["humbertodias/docker-sdl-compiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/humbertodias/docker-sdl-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humbertodias%2Fdocker-sdl-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humbertodias%2Fdocker-sdl-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humbertodias%2Fdocker-sdl-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humbertodias%2Fdocker-sdl-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humbertodias","download_url":"https://codeload.github.com/humbertodias/docker-sdl-compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humbertodias%2Fdocker-sdl-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276294994,"owners_count":25617996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","sdl2","sdl2-image","sdl2-mixer","sdl2-ttf","sdl3"],"created_at":"2024-11-14T03:23:42.221Z","updated_at":"2025-09-21T19:31:33.720Z","avatar_url":"https://github.com/humbertodias.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Deploy](https://github.com/humbertodias/docker-sdl-compiler/actions/workflows/deploy.yml/badge.svg)](https://github.com/humbertodias/docker-sdl-compiler/actions/workflows/deploy.yml)\n\n# SDL Compiler Docker Image\n\nA lightweight Docker image for **cross-compiling SDL applications**, supporting multiple SDL versions and targets such as native Linux, Windows (MinGW), and WebAssembly (Emscripten).\n\nDocker Hub: [hldtux/sdl-compiler](https://hub.docker.com/r/hldtux/sdl-compiler)\n\n## 🧩 Included Components\n\n* [SDL 1.2](https://www.libsdl.org/)\n* [SDL 2.x](https://www.libsdl.org/)\n* [SDL 3.x](https://www.libsdl.org/)\n* [Emscripten (emsdk)](https://emscripten.org/) – for compiling to WebAssembly\n* [MinGW-w64](http://mingw-w64.org) – for cross-compiling to Windows\n* Common C/C++ build tools (gcc, g++, make, etc.)\n\n## 🚀 How to Use\n\nMount your project directory and run the desired build command. Below are examples for each SDL version and target.\n\n### 🖥️ Native Compilation (Linux)\n\n#### SDL 1.2\n\n```bash\nSDL_VERSION=1.2\nSDL_PROJECT=./samples/sdl1\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'g++ main.cpp -o main -g `sdl-config --cflags --static-libs`'\n```\n\n#### SDL 2.x\n\n```bash\nSDL_VERSION=2.32.8\nSDL_PROJECT=./samples/sdl2\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'g++ main.cpp -o main -g `sdl2-config --cflags --static-libs`'\n```\n\n#### SDL 3.x\n\n```bash\nSDL_VERSION=3.2.18\nSDL_PROJECT=./samples/sdl3\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'g++ main.cpp -o main -g `pkg-config sdl3 --cflags --libs`'\n```\n\n### 🌐 WebAssembly (Emscripten)\n\n#### SDL 1.2 (Web)\n\n```bash\nSDL_VERSION=1.2\nSDL_PROJECT=./samples/emsdk\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'emcc main-sdl1.cpp -o sdl1.html -s USE_SDL=1 -s WASM=1'\n\necho 'Access http://localhost:8000/sdl1.html'\npython -m http.server -d $SDL_PROJECT\n```\n\n#### SDL 2.x (Web)\n\n```bash\nSDL_VERSION=2.32.8\nSDL_PROJECT=./samples/emsdk\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'emcc main-sdl2.cpp -o sdl2.html -s USE_SDL=2 -s WASM=1'\n\necho 'Access http://localhost:8000/sdl2.html'\npython -m http.server -d $SDL_PROJECT\n```\n\n#### SDL 3.x (Web)\n\n```bash\nSDL_VERSION=3.2.18\nSDL_PROJECT=./samples/emsdk\n\ndocker run --rm -ti \\\n  -v $SDL_PROJECT:/workdir \\\n  -w /workdir \\\n  hldtux/sdl-compiler:$SDL_VERSION \\\n  bash -ic 'emcc main-sdl3.cpp -o sdl3.html -s USE_SDL=3 -s WASM=1'\n\necho 'Access http://localhost:8000/sdl3.html'\npython -m http.server -d $SDL_PROJECT\n```\n\n## 🛠️ Building the Docker Image\n\nIf you want to build the image locally, follow the instructions in the [Docker build guide](./DOCKER.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumbertodias%2Fdocker-sdl-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumbertodias%2Fdocker-sdl-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumbertodias%2Fdocker-sdl-compiler/lists"}