{"id":20175132,"url":"https://github.com/frosit/hypernode-docker-wsl2","last_synced_at":"2025-04-10T03:47:45.173Z","repository":{"id":151001753,"uuid":"427455634","full_name":"frosit/hypernode-docker-wsl2","owner":"frosit","description":"A Wsl2 version of hypernode docker with os interop and wslg support","archived":false,"fork":false,"pushed_at":"2022-02-24T02:14:40.000Z","size":2318,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T05:04:49.038Z","etag":null,"topics":["docker","docker-image","jetbrains-projector","wsl","wsl-debian","wsl-environment"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/frosit.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}},"created_at":"2021-11-12T18:14:20.000Z","updated_at":"2024-11-09T05:31:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdc08446-7579-424e-b26b-4058937a9452","html_url":"https://github.com/frosit/hypernode-docker-wsl2","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/frosit%2Fhypernode-docker-wsl2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frosit%2Fhypernode-docker-wsl2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frosit%2Fhypernode-docker-wsl2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frosit%2Fhypernode-docker-wsl2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frosit","download_url":"https://codeload.github.com/frosit/hypernode-docker-wsl2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154995,"owners_count":21056542,"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":["docker","docker-image","jetbrains-projector","wsl","wsl-debian","wsl-environment"],"created_at":"2024-11-14T01:46:03.189Z","updated_at":"2025-04-10T03:47:45.163Z","avatar_url":"https://github.com/frosit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hypernode Docker WSL development environment\n\nThis repository contains a fully-featured Windows WSL development environment based on [hypernode-docker](https://github.com/ByteInternet/hypernode-docker) adjusted to support OS integration features that come with [WSL2 + WSLg](https://docs.microsoft.com/en-us/windows/wsl/) on Windows 11. This repository also integrates JetBrains IDE's using WSLg and projector to overcome filesystem performance issues.\n\n# Features\n\n* hypernode-docker as WSL2 environment\n* Support for WSL OS interoperability\n* Jetbrains Toolbox \u0026 JetBrains Projector pre-installed (overcoming disk performance)\n  * Allows to run PhpStorm as linux app directly from the WSL/container environment\n  * Allows to run PhpStorm as web app\n* Adds a ZSH environment\n\n# Prerequisites\n\n* Windows 11\n* [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install)\n* [WSLg](https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-support-for-linux-gui-apps)\n* [docker-desktop for windows](https://docs.docker.com/desktop/windows/install/)\n\nYou should have setup WSL/WSLg fully before you can use this repository. I recommend to follow the Microsoft guides above to install WSL/WSLg and a distro, for example ubuntu.\nYour setup is ready when you are able to for example start `gedit` from the WSL environment.\n\n__Warning__\n\nThe technologies used in this repository are fairly new and could be unstable. Also be aware of the security implications of using third-party WSL environments like this.\n\n# Installation\n\nThe WSL environment is build from a slightly modified hypernode-docker container using the Dockerfile in this repository.\n\n__1. Create the image__\n\nFirst we have to create the image by pulling it or building it ourselves.\n\n__Option: 1.a: pull the latest image__\n\n```bash\ndocker pull frosit/hypernode-docker-wsl:latest\n```\n\n__Option: 1.b: build the image yourself__\n\n```bash\n# or make build-container\ndocker build -t frosit/hypernode-docker-wsl:latest .\n```\n\n__2. Create the container__\n\n```bash\ndocker create --name hnwsl frosit/hypernode-docker-wsl:latest\n```\n\n__3. Export the container__\n\n```bash\ndocker export hnwsl -o hnwsl.tar\n```\n\n__3. Import the container as WSL__\n\nI prefer to store my WSL environments under `C:\\WSL\\\u003cdistro\u003e`. So for example create a directory `C:\\WSL\\hypernode` and then import the tar you exported earlier. For example:\n\n```powershell\nwsl.exe --import hypernode C:\\WSL\\hypernode C:\\WSL\\hnwsl.tar\n```\n\nRestarting Windows terminal will automatically add the hypernode WSL to Windows terminal. You can use `wsl.exe -d hypernode` to enter the WSL environment.\n\n## Optional: Docker integration\n\nIt is possible to use docker while in the WSL environment to add for example a different MySQL version. To do this go to the \"docker desktop app\" under settings \u003e Resources \u003e WSL Integration and check the WSL environment.\nThis will add a docker.sock within the WSL environment which is the same docker instance as your docker desktop.\n\n# Usage\n\nAfter import, there are a few things you can do.\n\n\u003e This image added sudo permissions to the app user and set the password to app. For root the password is root. You might want to change this: sudo passwd app\n\n## Bringing up services\n\nBy default, the ports of the hypernode are mapped to ports on localhost and you have to start the services yourself.\n\n```\nsudo service nginx start\nsudo service php7.2-fpm start\nsudo service mysql.distrib start\nsudo service redis-server start\n```\n\nThen you can find your instance on http://localhost.\n\n## Switch PHP Version (@todo add)\n\n\u003e @todo add switch php scripts\n\n## Starting an IDE using jetbrains-toolbox\n\nExecuting `jetbrains-toolbox` will bring up the toolbox dialogue from which you can install/start and IDE like PhpStorm. The first time could take a bit longer.\n\n## Starting an IDE as cloud/web app using Projector\n\nThe `projector` command has options to manage projector IDE's. To install use `projector install`. Afterwards you can use `projector run \u003cide\u003e` to start the IDE.\n\n\u003e note: projector is also new and slightly unstable. It should come on port 9999 of localhost\n\n## Install xDebug\n\nTo install run: `sudo apt install php-xdebug`. xdebug should be available right away.\n\n@todo PhpStorm configurations\n\n# Issues\n\nWSL2/WSLg has a few known issues. Information about these issues [can be found here](docs/known-issues.md)\n\n# Preview\n\nHere's my current and main development environment using the hypernode-docker as WSL environment. Including a themed Windows Terminal.\n\n![terminal + jetbrains toolbox](docs/images/term-toolbox.png)\n\n## Running PhpStorm from the hypernode environment using WSLg\n\n![phpstorm WSLg](docs/images/phpstorm-wslg.png)\n\n## PhpStorm in Edge using projector server\n\n![phpstorm projector server](docs/images/phpstorm-edge.png)\n\n## asciicast\n\n[![asciicast](https://asciinema.org/a/451194.svg)](https://asciinema.org/a/451194)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrosit%2Fhypernode-docker-wsl2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrosit%2Fhypernode-docker-wsl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrosit%2Fhypernode-docker-wsl2/lists"}