{"id":28512759,"url":"https://github.com/ramsafin/ros-docker","last_synced_at":"2026-02-21T18:01:07.291Z","repository":{"id":275153161,"uuid":"925236227","full_name":"ramsafin/ros-docker","owner":"ramsafin","description":"ROS 1 in a Docker container","archived":false,"fork":false,"pushed_at":"2025-04-21T16:54:03.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T01:01:50.186Z","etag":null,"topics":["catkin","docker","dockerfile","nvidia-container-toolkit","ros","workspace","wsl","wslg"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramsafin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-31T13:50:55.000Z","updated_at":"2025-04-30T11:26:47.000Z","dependencies_parsed_at":"2025-01-31T15:21:31.542Z","dependency_job_id":"e7a8188c-17f9-4e3f-b252-7e9acb56fd38","html_url":"https://github.com/ramsafin/ros-docker","commit_stats":null,"previous_names":["ramsafin/ros-noetic-docker","ramsafin/ros-docker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ramsafin/ros-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsafin%2Fros-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsafin%2Fros-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsafin%2Fros-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsafin%2Fros-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramsafin","download_url":"https://codeload.github.com/ramsafin/ros-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramsafin%2Fros-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["catkin","docker","dockerfile","nvidia-container-toolkit","ros","workspace","wsl","wslg"],"created_at":"2025-06-09T01:01:00.587Z","updated_at":"2026-02-21T18:01:07.284Z","avatar_url":"https://github.com/ramsafin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS with Docker\n\nThis project provides a ready-to-use Docker container for ROS 1 (ROS Noetic) for development and testing. It simplifies the process of working with ROS in an isolated, reproducible environment that can run on both Windows (via WSL) and Linux. The setup includes GUI support for ROS development in WSLg and native Linux systems, along with easy integration with your existing ROS workspace.\n\n## Prerequisites\n\nBefore you begin, make sure you have the following installed:\n\n- **Docker**: [install Docker](https://docs.docker.com/get-docker/) for your platform.\n- **NVIDIA Container Toolkit**: [install NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-container-toolkit?tab=readme-ov-file) if you have an NVIDIA GPU.\n- Windows Subsystem for Linux (WSL): [install WSL](https://learn.microsoft.com/ru-ru/windows/wsl/install) if you want to run Docker containers in Windows.\n\nEnsure you have WSLg installed, as it enables GUI support for Docker containers in Windows. If you're unsure about this, refer to the [WSLg Installation guide](https://github.com/microsoft/wslg).\n\n## Setting Up the Project\n\n### 1. Clone the Project\n\nIf you haven't already, clone this repository to your local machine:\n\n```bash\ngit clone https://github.com/ramsafin/ros-docker.git\ncd ros-docker\n```\n\n### 2. Build the Docker Image\n\nThere are two build options available depending on your environment: WSL and Linux.\n\nBuild the Docker image optimized for WSL:\n```bash\nmake build_wsl\n```\n\nBuild the Docker image optimized for Linux:\n```bash\nmake build_linux\n```\n\nThe [Makefile](Makefile) handles the setup for different environments, adjusting the Dockerfile build arguments accordingly.\n\n### 3. Running the Docker Container\n\nTo start a container with GUI support and **mount your ROS workspace**, use:\n```bash\nmake run_wsl\n```\nor\n```bash\nmake run_linux\n```\n\nThis will automatically handle display forwarding if you are using WSLg. For non-WSLg setups, you may need to configure access to the X server (e.g., with `xhost` in non-WSL2 environments).\n\n### 4. Building the ROS Workspace\n\nBy default your ROS workspace inside the container is `ROS_WORKSPACE=/home/ros/catkin_ws`.\n\nOnce inside the container, navigate to your ROS workspace and build it:\n\n```bash\ncd $ROS_WORKSPACE \u0026\u0026 catkin_make\n```\n\nAlternatively, using [catkin-tools](https://catkin-tools.readthedocs.io/en/latest/):\n```bash\ncd $ROS_WORKSPACE \u0026\u0026 catkin build\n```\n\nThis will generate the `build/`, `devel/`, and `install/` directories in the `catkin_ws` directory.\n\nIf you have uninstalled dependencies, use:\n```bash\nrosdep install --from-paths $ROS_WORKSPACE/src --ignore-src -y\n```\n\n### 5. Running ROS Nodes\n\nAfter building your workspace, you can start working with ROS nodes. For example, you can run the ROS master:\n\n```bash\nroscore\n```\n\nDo not forget to source your ROS environment and workspace:\n```bash\nsource /opt/ros/$ROS_DISTRO/setup.bash\nsource $ROS_WORKSPACE/devel/setup.bash\n```\n\n### 6. Stopping the Container\n\nWhen you're finished, you can stop the container by typing `exit` or pressing `Ctrl+D`. Since the container was started with `--rm`, it will be automatically removed when stopped.\n\nTo manually stop the container, run:\n```bash\nmake stop\n```\n\n## Troubleshooting\n\n### How to select GPU in WSLg?\n\nThe NVIDIA GPU can be selected in WSL by setting `MESA_D3D12_DEFAULT_ADAPTER_NAME`:\n```bash\necho \"export MESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\nFollow the instructions in the [GPU selection in WSLg](https://github.com/microsoft/wslg/wiki/GPU-selection-in-WSLg) guide.\n\n### Containerizing GUI apps with WSLg\n\nFollow the instructions in the [wslg/containers](https://github.com/microsoft/wslg/blob/861d029e97bc99e68050f86c956803b42e8756da/samples/container/Containers.md) guide.\n\n### Docker container cannot connect to X server\n\nEnsure that the `xhost` command is used to allow Docker to connect to the X server:\n```bash\nxhost +SI:localuser:$(whoami)\n```\n\nAdditionally, verify that your X server is running.\n\n### How to check that NVIDIA is used for OpenGL rendering?\n\nCheck the output of the command:\n```bash\nglxinfo -B | grep Device\n```\n\nIt should be your NVIDIA GPU.\n\n## Auxiliary\n\n1. For more detailed documentation on setting up and using ROS Noetic, visit the [official ROS documentation](http://wiki.ros.org/noetic).\n2. For more information about WSLg, visit the [WSLg official repository](https://github.com/microsoft/wslg).\n\n## Contributing\n\nIf you'd like to contribute to this project, feel free to fork the repository and submit a pull request. You can also open an issue if you encounter any bugs or have suggestions for improvement.\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsafin%2Fros-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsafin%2Fros-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsafin%2Fros-docker/lists"}