{"id":16110058,"url":"https://github.com/madduci/remote-environments","last_synced_at":"2025-07-26T22:08:01.442Z","repository":{"id":146309030,"uuid":"233273224","full_name":"madduci/remote-environments","owner":"madduci","description":"Docker-based remote environments using SSH access","archived":false,"fork":false,"pushed_at":"2023-10-31T13:28:27.000Z","size":78,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T08:33:44.935Z","etag":null,"topics":["cpp","docker","go","java","php","python","rust"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/madduci.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}},"created_at":"2020-01-11T17:51:59.000Z","updated_at":"2024-12-25T22:29:05.000Z","dependencies_parsed_at":"2023-07-02T14:16:26.776Z","dependency_job_id":null,"html_url":"https://github.com/madduci/remote-environments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madduci%2Fremote-environments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madduci%2Fremote-environments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madduci%2Fremote-environments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madduci%2Fremote-environments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madduci","download_url":"https://codeload.github.com/madduci/remote-environments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911089,"owners_count":20367624,"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","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":["cpp","docker","go","java","php","python","rust"],"created_at":"2024-10-09T19:35:20.954Z","updated_at":"2025-03-18T09:30:52.006Z","avatar_url":"https://github.com/madduci.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remote-environments\n\nCollection of Docker-based development environments accessible via SSH, using public-key authentication.\n\nInspired by Microsoft's [Remote SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) Visual Studio Code extension, it allows you to develop in a Docker container with your preferred language.\n\n## Requirements\n\n* Docker CE/EE 18.06+\n* docker-compose 1.24+\n* A ssh client (e.g. `openssh` on Linux)\n* A ssh key (e.g. `ssh-keygen` on Linux)\n* Visual Studio Code with Remote SSH extension (optional)\n\n## How to build images\n\nThere's a `Makefile` available in the repository, you can execute one of the following commands:\n\n```shell\nmake cpp\nmake go\nmake java\nmake javascript\nmake php\nmake python\nmake rust\n```\n\nThe above commands will build the desired environment(s).\n\nBy typing `make`, all the environments will be built automatically.\n\nTo force a rebuild, append the flag `-B` to the make command\n\n## How to run containers\n\nYou need to configure the `docker-compose.yml` file for the desired environment, by setting the path to your local public key (on Linux, stored in `~/.ssh/`) that will be used with SSH.\n\nAfter that, you can start the environments with the following commands:\n\n```shell\nmake cpp-start\nmake go-start\nmake java-start\nmake javascript-start\nmake php-start\nmake python-start\nmake rust-start\n```\n\nThe environments will be available at ports starting from 22221, listening on the `localhost` address.\n\nThe default user is `builder`, so if you want to connect to the docker environment, just type (e.g. the C++ environment):\n\n`ssh builder@localhost -p22221`\n\n### Port Mapping\n\nThe environments expose the following ports:\n\n| Environment  | Docker Host  | Docker Container  | \n|--------------|--------------|-------------------|\n| C++          | 22221        | 22  |\n| Go           | 22222        | 22  |\n| Java         | 22223        | 22  |\n| PHP          | 22224        | 22  |\n| Python       | 22225        | 22  |\n| Rust         | 22226        | 22  |\n| Javascript   | 22227        | 22  |\n\n## How to stop containers\n\nYou can stop the containers by typing:\n\n```shell\nmake cpp-stop\nmake go-stop\nmake java-stop\nmake javascript-stop\nmake php-stop\nmake python-stop\nmake rust-stop\n```\n\nAnd the environment will be stopped, without losing its content.\nTo perform a cleanup, call directly the `docker-compose.yml` file you are interested in or issue the command `make clean` and all the running containers will be stopped.\n\n## Gotchas\n\n* VSCodium, the stripped version of Visual Studio Code **does not work** since it requires closed source components only available in Code\n  \n* Every time you rebuild an image and start a desired environment, you have to cleanup your list of authorized keys in your SSH client (in Linux, usually the file ~/.ssh/known_hosts)\n\n* If you want to save your work outside the container, you have three options:\n  - use the `git` command to save your work to a remote repository (e.g. GitHub, GitLab, BitBucket)\n  - use the `docker cp` command to copy files and/or folders on your host\n  - modify the `docker-compose.yml` file(s) and mount a custom path as volume in the container. Be sure you have the required permissions to read/write files in the mounted volume.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadduci%2Fremote-environments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadduci%2Fremote-environments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadduci%2Fremote-environments/lists"}