https://github.com/hywax/lxc-idmapper
LXC unprivileged mapper
https://github.com/hywax/lxc-idmapper
idmap lxc lxc-containers proxmox
Last synced: about 1 year ago
JSON representation
LXC unprivileged mapper
- Host: GitHub
- URL: https://github.com/hywax/lxc-idmapper
- Owner: hywax
- License: mit
- Created: 2024-03-11T19:33:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T19:02:18.000Z (about 2 years ago)
- Last Synced: 2024-05-20T22:19:34.099Z (about 2 years ago)
- Topics: idmap, lxc, lxc-containers, proxmox
- Language: TypeScript
- Homepage: https://hywax.space/projects/lxc-id-mapper
- Size: 885 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# LXC ID Mapper
[![npm version][npm-version-src]][npm-version-href]
[![License][license-src]][license-href]
LXC ID Mapper is a library designed to map container GIDs to host UIDs for LXC containers. This library provides a simple and efficient way to manage user and group IDs in a containerized environment, ensuring that the correct permissions are applied and that the security of the host system is maintained.
Table of Contents
* [Usage](#-usage)
* [Playground](#playground)
* [Basic](#basic)
* [Installation](#-installation)
* [Credits](#-credits)
* [Contributors](#contributors)
* [License](#-license)
## ๐งช Usage
### Playground
Try the library online using the provided playground - **[visit playground](https://hywax.space/projects/lxc-id-mapper)**.
### Basic
```typescript
import { mapper } from 'lxc-id-mapper'
const result = mapper([
{ containerId: 1000, hostId: 1005 }
])
console.log(result.idMap) // Outputs the mapped IDs
```
## ๐ Installation
```bash
# Using pnpm
pnpm add lxc-idmapper -D
# Using yarn
yarn add lxc-idmapper -D
# Using npm
npm install lxc-idmapper -D
```
## ๐ Credits
A huge thank you to everyone who is helping to improve Mafl. Thanks to you, the project can evolve!
### Contributors
To become a contributor, please follow our [contributing guide](CONTRIBUTING.md).

## ๐ License
This template was created under the [MIT License](LICENSE).
[npm-version-src]: https://img.shields.io/npm/v/lxc-idmapper/latest.svg?logo=hackthebox&color=E56F01&logoColor=fff
[npm-version-href]: https://npmjs.com/package/lxc-idmapper
[license-src]: https://img.shields.io/badge/License-MIT-E56F01?logo=opensourceinitiative&logoColor=fff
[license-href]: https://npmjs.com/package/lxc-idmapper