{"id":19109963,"url":"https://github.com/coopdevs/devenv","last_synced_at":"2025-08-25T00:07:18.580Z","repository":{"id":36543567,"uuid":"117844699","full_name":"coopdevs/devenv","owner":"coopdevs","description":"Simple script to create LXC development environments","archived":false,"fork":false,"pushed_at":"2025-01-23T15:43:46.000Z","size":90,"stargazers_count":8,"open_issues_count":2,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-30T20:35:12.678Z","etag":null,"topics":["lxc"],"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/coopdevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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":"2018-01-17T14:06:39.000Z","updated_at":"2025-01-23T15:43:46.000Z","dependencies_parsed_at":"2024-05-31T11:41:28.191Z","dependency_job_id":"8bdf1d16-03cc-4fc5-817e-f39b631a0456","html_url":"https://github.com/coopdevs/devenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coopdevs/devenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fdevenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fdevenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fdevenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fdevenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coopdevs","download_url":"https://codeload.github.com/coopdevs/devenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coopdevs%2Fdevenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271983254,"owners_count":24853809,"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-08-24T02:00:11.135Z","response_time":111,"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":["lxc"],"created_at":"2024-11-09T04:23:01.943Z","updated_at":"2025-08-25T00:07:18.538Z","avatar_url":"https://github.com/coopdevs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devenv\nA `bash` script to create and manage development environments using privileged [LXC](https://linuxcontainers.org/) linux containers.\n\n## Requirements\n\n1. LXC \u003e= 2.1\n2. Network bridge called `lxcbr0`\n\n_Notes_:\n\n1. **devenv** has been also tested with LXC version 2.0.7 with Debian Stretch. In order to work, one needs to adapt the network configuration using the old keys.\n2. In Ubuntu and Debian lxc gets installed along a systemd unit called `lxc-net`, configurable at `/etc/default/lxc-net`.\n\nSee the [Debian lxc how-to](https://wiki.debian.org/LXC?action=recall\u0026rev=179#Minimal_changes_networking_in_.2BIBw-stretch.2BIB0-) for both requirements.\n\n## Install\nRun `make install` with root privileges to install the script in your system.\nIt will copy the executable script to `/usr/sbin/devenv` and its config to `/etc/devenv`\n\n## Update\nIf you are keeping a copy of this repo, do: `git pull \u0026\u0026 sudo make install`.\nIf you have deleted, clone again this repo and then do `sudo make install`.\n\n## Uninstall\nRun `make uninstall` with root privileges to remove both the config and executable from your system.\nBeware that if you have substituted any of those files by anything else, they will be removed regardless.\n\n### Why in /usr/sbin?\nPlease give a look at [Filesystem Hierarchy](https://jlk.fjfi.cvut.cz/arch/manpages/man/file-hierarchy.7).\n\n## Execution\n\nTo run the `devenv` script you need to create a `.devenv` configuration file in your project directory. You can run the `init` command to generate it containing the following variables:\n\n```\n# \u003cPROJECT_PATH\u003e/.devenv file\n\nNAME=\"\u003ccontainer name\u003e\"\nDISTRIBUTION=\"\u003cSO distribution\u003e\"\nRELEASE=\"\u003cSO release\u003e\"\nARCH=\"\u003cSO arch\u003e\"\nHOST=\"local.$NAME.coop\"\n\n# Optional -- To create a new user and group\nDEVENV_USER=\"\u003cuser that will own the project\u003e\"\nDEVENV_GROUP=\"\u003cgroup that will own the project\u003e\"\n\n# Optional -- To mount projects.\n# If you don't need a shared dir between host and guest, just\n# comment the lines or unset them. Empty string doesn't work.\n# Otherwise, if you need the shared mount, set the vars below and\n# make sure that the directories exists in the host machine\n# before executing this script.\n# The name of the directories will be the name of the folders\n# in the container. For example, if you have a directory\n# \"/path/to/first_directory\" in the host machine, the container\n# will have a folder \"first_directory\" in the BASE_PATH.\nPROJECT_PATHS=(\n    \"/path/to/first_directory\"\n    \"/path/to/second_directory\"\n)\nBASE_PATH=\"\u003cbase project path\u003e\"\nPROJECT_POST_PATH=\"\u003cpost project path\u003e\"\n\n# Select the python interpeter python2.7 or python3\nPYTHON_INTERPRETER=python3\n```\n\nThen run `devenv` in your project directory.\n\n## Description\n\nThe script will:\n\n* Create a container\n* Mount your project directories into container in `/\u003cBASE_PATH\u003e/\u003cPROJECT_NAME\u003e/\u003cPROJECT_POST_PATH\u003e`\n* Add container IP to `/etc/hosts`\n* Create a group with same `gid` of project directory and named `$DEVENV_GROUP` if `DEVENV_GROUP` and `DEVENV_USER` are defined.\n* Create a user with same `uid` and `gid` of project directory and named `$DEVENV_USER` if `DEVENV_GROUP` and `DEVENV_USER` are defined.\n* Add system user's SSH public key to user\n* Install python in container\n\nWhen the execution ends, you'll have a container ready to provision and deploy your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoopdevs%2Fdevenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoopdevs%2Fdevenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoopdevs%2Fdevenv/lists"}