{"id":32605797,"url":"https://github.com/kennyhyun/linuxdev","last_synced_at":"2025-10-30T10:59:54.020Z","repository":{"id":46016289,"uuid":"402791884","full_name":"kennyhyun/linuxdev","owner":"kennyhyun","description":"Boot up Linux development env using Vagrant","archived":false,"fork":false,"pushed_at":"2025-08-27T15:26:30.000Z","size":3899,"stargazers_count":4,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T00:35:12.991Z","etag":null,"topics":["docker","hacktoberfest","linux"],"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/kennyhyun.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":"2021-09-03T14:10:34.000Z","updated_at":"2025-08-20T01:17:05.000Z","dependencies_parsed_at":"2024-02-22T13:29:15.047Z","dependency_job_id":"06c63a50-dfda-45cc-b620-d981a5e2b742","html_url":"https://github.com/kennyhyun/linuxdev","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kennyhyun/linuxdev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennyhyun%2Flinuxdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennyhyun%2Flinuxdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennyhyun%2Flinuxdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennyhyun%2Flinuxdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennyhyun","download_url":"https://codeload.github.com/kennyhyun/linuxdev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennyhyun%2Flinuxdev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281793987,"owners_count":26562617,"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-10-30T02:00:06.501Z","response_time":61,"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","hacktoberfest","linux"],"created_at":"2025-10-30T10:59:33.644Z","updated_at":"2025-10-30T10:59:54.008Z","avatar_url":"https://github.com/kennyhyun.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linuxdev\n\nBoot up Linux development env using Vagrant\n\n|  | Docker Desktop  | Linuxdev with Vagrant |\n|--|------|------|\n|Docker hub account\t|\u003csub\u003esignin is required if you want to stop checking updates\u003c/sub\u003e\t|\u003csub\u003e✅**login to Docker hub is not necessary**\u003c/sub\u003e|\n|Control over the Docker Engine Version\t|\u003csub\u003eShould use latest above v3, unless the user ignore the updates\u003c/sub\u003e|\u003csub\u003e✅**have the controll for docker-ce (community edition)**\u003c/sub\u003e|\n|Licensing\t|\u003csub\u003efree for small business and personal, but auto-checking-update\u003c/sub\u003e|\u003csub\u003e✅**free of charge (w/o VB extension pack)**\u003c/sub\u003e|\n|Network setup\t|\u003csub\u003eHost network\t\u003c/sub\u003e|\u003csub\u003e✅**Can Choose \u003cbr\u003e. Bridge(host) \u003cbr\u003e. NAT + Host-only**\u003c/sub\u003e|\n|Performance\t|\u003csub\u003e. Hyper-v VM; might be slightly better but it likely consumes more memory\u003c/sub\u003e|\u003csub\u003e. Virtualbox VM; not so bad\u003cbr\u003e. Has alternatives (Hyper-v/VMWare/Virtualbox)\u003c/sub\u003e|\n|Environment\t|\u003csub\u003eSlightly different environment between\u003cbr\u003e. Windows WSL2 (Custom distro integration required for Docker host access)\u003cbr\u003e. Windows VM (w/o Docker host acess)\u003cbr\u003e. Mac VM (w/o Docker host acess)\u003c/sub\u003e|\u003csub\u003e✅**Common Linux environment available in Mac/Windows\u003cbr\u003e. Full Linux VM will be provided as a Docker host\u003cbr\u003e  (Files can be shared natively in Linux host)\u003cbr\u003e. Docker engine can be also accessed from the host OS\u003cbr\u003e  (docker and docker-compose client installation required)**\u003c/sub\u003e|\n|Installation\t|\u003csub\u003eInstaller provided\u003c/sub\u003e|\u003csub\u003eInstall scripts provided\u003c/sub\u003e|\n|Starting Docker\t|\u003csub\u003e**Autostart configurable**\u003c/sub\u003e|\u003csub\u003eStartup script is provided both for Windows and Mac\u003c/sub\u003e|\n|Clients\t|\u003csub\u003eProvided along with the Docker Desktop installer\u003c/sub\u003e|\u003csub\u003eInstall scripts provided\u003c/sub\u003e|\n|Config\t|\u003csub\u003e✅**Configurable in GUI**\u003c/sub\u003e|\u003csub\u003eConfigurable in script\u003c/sub\u003e|\n|Docker storage\t|\u003csub\u003eConfigurable size\u003c/sub\u003e|\u003csub\u003e✅**Configurable 2k block size with a lot of inodes**\u003c/sub\u003e|\n|Logs/status\t|\u003csub\u003e✅**GUI provided**\u003c/sub\u003e|\u003csub\u003eOnly available in CLI\u003c/sub\u003e|\n|Limiting memory usuage\t|\u003csub\u003e.wslconfig file for WSL2/GUI for VM\u003c/sub\u003e|\u003csub\u003e.env file/VirtualBox GUI\u003c/sub\u003e|\n\n\n## ⚠ Note for Windows VBS (Virtualization-based security or Device Guard)\n\n**Some** recent windows update enables VBS and it will turn on hyper-v\nand that would make Vrtualbox slow and unstable.\n\nIf `systeminfo` command shows following at the bottom, it's good to use Virtualbox.\n\n```\nHyper-V Requirements:      VM Monitor Mode Extensions: Yes\n                           Virtualization Enabled In Firmware: Yes\n                           Second Level Address Translation: Yes\n                           Data Execution Prevention Available: Yes\n```                        \n\nPease follow [he issue](https://github.com/kennyhyun/linuxdev/issues/71) for further guidance.\n\n## Why?\n\nDocker is necessary for developing nowadays. But if you are not using Linux as the OS, it requires VM for Docker engine.\n\nI was using Linux in Virtualbox for many years and found that was quite nice and had no problem for using docker in it. And personally satisfied with the performance of docker in VM\nIn the other hand, Docker Desktop, I found couple of issue with using Docker Desktop in Windows recently.\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat I didn't like about WSL/Docker Desktop\u003c/summary\u003e\n    \n- Memory usage is keep growing upto VM memory limitation\n- some file was missing for binding into docker\n- Additional settings to ssh in to the linux\n- ssh connection env was a bit different (not sure) when used in terminal\n- X client was blocked by Windows Firewall\n- not sure what it was but felt heavy\n\n\u003c/details\u003e\n\n### Some known Docker Desktop for Windows issue\n\n- Watching files in the host is not working\n- Hyper-v is not returning unused memory frequently so the host can be struggling with memory.\n\nSo it's generally recommended to use WSL2 Ubunu but I would rather use VM\n\n### Linuxdev with Vagrant (VirtualBox)\n\n- Virtualbox seems to be able to run many containers more stable and does not apply much pressure to the host memory. (compared to WSL2)\n- Generally there are less issues in developing in Linux than Windows (Same reason to use WSL2)\n- Full configurable linux host (docker)\n- USB ports can be used directly in VM (Note: USB3 in VB is available in the extension pack, which is free for only personal users)\n\n### Also for Mac Users\n\nNot only for the Windows users, there would be some advantage for Mac users as well\n\n- Easily backup/cleanup VM/dev env\n- The dev env is a sandbox\n- A reference environment for Linux env\n- Run linux GUI apps using X server and tunneling\n- Docker is running Linux VM already, why not?\n- Multiple network interfaces available\n\nAnd if you are familiar with the Linux command line, using Linux makes more senses than using Docker Desktop.\n\n- Share VM when you need to bootcamp to windows\n- Access to docker host\n- Unlimited access to host(Linux VM) root directory\n- Faster host(Linux VM) volume sharing\n- Free\n\n### Performance comparison\n\nFor comparison, I tried one of my project which builds multiple docker images with node.js and filling up 20GB of docker storage.\n\nBuilding includes installing node packages and webpack.\nDocker build kit was used for cache mounting.\n\n|Env|Build Time|Note|\n|--|--|--|\n|Linuxdev (Windows host)\u003cbr\u003e6GB, i7 4 cores| 24m 12s | |\n|WSL2 (Docker Descktop)\u003cbr\u003e16GB, i7 6 cores (no .wslconfig) |19m 18s| spent up to 13GB|\n|WSL2 (Docker Descktop)\u003cbr\u003e8GB, i7 6 cores (with .wslconfig)| 18m 22s||\n|Linuxdev (Windows host)\u003cbr\u003e8GB , i7 6 cores| ✅ **14m 39s**||\n|Mac OSX (Docker Descktop)\u003cbr\u003e8GB, i7 6 cores| 19m 37s|First build failed after 1 hour|\n|Linuxdev (Windows host)\u003cbr\u003e8GB , i7 4 cores| 21m 13s||\n\nThis was just an instance of the build. Just to let you know.\nAs you noticed, Linuxdev was the best in some situation.\n\n## Setting up the Linuxdev environment\n\n### ⚠ Note for Windows users\nThe script will disable Hyper-v (WSL2) and replace with VM and you can also use Docker from the host OS\n\n### Running scripts\n\n1. Unzip or git clone this repo\n    - https://github.com/kennyhyun/linuxdev/archive/refs/heads/main.zip\n1. Run setup scripts\n    - Windows\n        1. Install host dependencies and dev tools\n            - Open powershell as Admin and run\n              - `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`: enables ps1 for this powersell process\n              - `setup.ps1`\n            - This might require rebooting.\n        1. Bootup vagrant with provision\n            - Open terminal (git bash) and run `bootstrap.sh`\n    - Mac\n        1. Install host dependencies and dev tools\n            - Open teminal and run `setup.sh`\n        1. Bootup vagrant with provision\n            - continue to run `bootstrap.sh`\n1. Wait until bootstrap.sh does\n    - input username to use in the VM\n    - Install Debian Linux 10.10\n    - Install Docker v20.10.8 (configurable in config/env_var.sh; remove VERSION if you want the latest)\n    - Install docker-compose (v1.29.2; configurable in .env `__VM__COMPOSE_VERSION`)\n    - Create a user with UID 1000 and sudoer\n    - ohmyzsh\n    - expose samba share, `Projects`\n    - generate id_rsa key and show public key\n    - add ssh config for linuxdev\n    - generate docker certificates and set bash variables\n\nIt's okay to repeat this bootstrap script if something went wrong.\n\nYou can customise VM by setting .env file manually\n\n```\nDOCKER_DISK_SIZE_GB=45\nDOTFILES_REPO=https://gitlab.imaginetoolbox.com/whitech-pty-ltd/dotfiles.git\nHOST_PATHS=~/Projects,~/ImagineKiosk/centralised_data,~/ImagineKiosk/central_jobs,~/ImagineKiosk/CENTRAL_DATA_ASSET_PATH\n__VMHOSTS__127_0_0_1=localstack\n__VMHOSTS__127_0_0_1_distinguish=kiosk.whitechstage.com\n__VM__PROJECT_DIR=\"~/Projects/imagine-online\"\n__VM__WHITECH=1\nFONT_URLS=https://www.fontsquirrel.com/fonts/download/camingocode\nPATCHED_FONT_URLS=https://github.com/tonsky/FiraCode/releases/download/5.2/Fira_Code_v5.2.zip\n```\n\n### After finished bootstraping\n\nCopy and paste ssh public key to use in Github and where ever it's required.\n\nNow you can ssh into Linux dev env\n\n```bash\nssh linuxdev\n```\n\nand you can also run any linux commands from the host terminal\n\n```bash\nssh linuxdev -t echo hello from VM\n```\n\nFor Windows Terminal, there is also a profile generated for the machine.\n\nAn additional external configuration [dotfiles project like this](https://github.com/kennyhyun/dotfiles) can be added \n\nIf DOTFILES_REPO has been defined in `.env`, it clones the repo to ~/dotfiles and try to run\n\n- bootstrap*\n- init*\n- install*\n- setup*\n\nany of files which is executable.\n\n## Demo\n\n`setup.ps1` (Windows Powershell script; Use setup.sh for Mac)\n\n[![asciicast](https://asciinema.org/a/IqGHfToxLcfSwSJRoBIHZBoWY.svg)](https://asciinema.org/a/IqGHfToxLcfSwSJRoBIHZBoWY)\n\n`bootstrap.sh` (Mac; You can also use it in Git bash in Windows Terminal)\n\n[![asciicast](https://asciinema.org/a/o7HNUExImgO6gCKjlUTczwK7G.svg)](https://asciinema.org/a/o7HNUExImgO6gCKjlUTczwK7G)\n\n\n## Packages managed by Linuxdev\n\n### Packages covered by setup (host)\n\n- vagrant\n- virtualbox\n- vscode\n- git\n- Windows Terminal (Windows)\n- iterm2 (Mac)\n- gnu-sed (Mac)\n- and so on...\n\n### Packages covered by bootstrap (VM)\n\n- docker (installed by vagrant provision)\n- docker-compose\n- python3-pip\n- git\n- zsh\n- oh-my-zsh\n- vim-gtk (for vim-python3)\n- dnsutils\n- and so on...\n\n## [Tips](./docs/tips.md)\n\n## [Configuring VM](./docs/configuring-vm.md)\n\n## Installing and using docker clients\n\nThis vm provides docker connection in `2376` port.\nIf you have docker client and set the env vars you can use docker from the host like Docker Desktop.\n\nYou can also install docker and docker-compose by running install-docker-clients script.\n\n`.bashrc` or `.zshrc` has DOCKER_HOST and required variables for Mac/Git-bash and `docker_env.bat` will set variables in the command terminal in Windows.\n\nBootstrap installes the required variables automaticaly so you can use docker straightaway.\n\n## Additional Goals\n\n- Share virtualbox env across Bootcamp\n- Provide recommended fonts with Powerline patch\n\n## License\n\n[MIT License](https://github.com/kennyhyun/linuxdev/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennyhyun%2Flinuxdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennyhyun%2Flinuxdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennyhyun%2Flinuxdev/lists"}