podmanager 0.0.0-stage β 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +105 -2
- package/bin/podmanager.js +105 -0
- package/package.json +43 -4
- package/public/css/style.css +2042 -0
- package/public/index.html +1028 -0
- package/public/js/api.js +162 -0
- package/public/js/app.js +1912 -0
- package/public/podmanager.webp +0 -0
- package/src/app.js +23 -0
- package/src/index.js +46 -0
- package/src/middlewares/async-handler.middleware.js +8 -0
- package/src/middlewares/error.middleware.js +13 -0
- package/src/routes/containers.route.js +125 -0
- package/src/routes/events.route.js +48 -0
- package/src/routes/images.route.js +61 -0
- package/src/routes/index.js +20 -0
- package/src/routes/networks.route.js +31 -0
- package/src/routes/pods.route.js +50 -0
- package/src/routes/system.route.js +26 -0
- package/src/routes/volumes.route.js +33 -0
- package/src/services/podman.service.js +404 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Podmanager
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="apps/ui/public/podmanager.webp" width="96" height="96" alt="Podmanager Logo" style="border-radius: 18px;" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# Podmanager
|
|
6
|
+
|
|
7
|
+
The lightweight, native, and modern web app for podman environments.
|
|
8
|
+
|
|
9
|
+
[](#-key-features)
|
|
10
|
+
[](#-quick-start)
|
|
11
|
+
[](CONTRIBUTING.md)
|
|
12
|
+
[](#-why-podmanager)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## π Overview
|
|
18
|
+
|
|
19
|
+
**Podmanager** is a sleek, responsive, and production-ready web interface designed specifically for [Podman](https://podman.io/). It empowers developers and system administrators to inspect, manage, and monitor containers, pods, images, volumes, and networks with speed and precision.
|
|
20
|
+
|
|
21
|
+
Unlike traditional container dashboards designed around Docker daemons, **Podmanager embraces the Podman philosophy**:
|
|
22
|
+
- Works natively with **rootless** containers without privileged root access.
|
|
23
|
+
- Operates directly via the Podman CLI without requiring complex systemd user sockets or persistent background daemons.
|
|
24
|
+
- Delivers a lightning-fast single-page interface with a footprint under **30 MB RAM**.
|
|
25
|
+
|
|
26
|
+
## β‘ Why Podmanager?
|
|
27
|
+
|
|
28
|
+
| Feature | Podmanager | Portainer | Cockpit-Podman |
|
|
29
|
+
| :-------------------------------- | :--------------------------------- | :------------------------------ | :------------------------ |
|
|
30
|
+
| **Native Rootless Podman** | β
Native | β οΈ Complex socket setup | β
Native |
|
|
31
|
+
| **Native Pods Support** | β
First-class | β Docker focused | β οΈ Basic |
|
|
32
|
+
| **Zero Socket / Daemon Required** | β
Direct CLI execution | β Requires Docker/Podman socket | β Requires cockpit-bridge |
|
|
33
|
+
| **Resource Footprint** | β‘ **< 30 MB RAM** | π’ ~150β250 MB | π’ System service overhead |
|
|
34
|
+
| **Real-Time SSE Streaming** | β
Logs, Events & Pulls | β οΈ Polling / WebSocket | β οΈ Polling |
|
|
35
|
+
| **In-Browser Container Exec** | β
Instant CLI runner | β
Available | β
Available |
|
|
36
|
+
|
|
37
|
+
## β¨ Key Features
|
|
38
|
+
|
|
39
|
+
- **π Dashboard & Resource Analytics**: Real-time Podman engine health, CPU/memory stats, storage usage breakdown (`system df`), and one-click resource pruning.
|
|
40
|
+
- **π¦ Container Lifecycle & Web Terminal**: Start, stop, restart, pause, remove, inspect OCI configs, stream live logs via SSE, and run interactive commands with in-browser `exec`.
|
|
41
|
+
- **βΈοΈ First-Class Podman Pods**: Full support for multi-container pods, shared networking, port publications, and batch lifecycle management.
|
|
42
|
+
- **πΌοΈ Image Hub & Live Pull Streaming**: Browse local images, deploy containers in one click, and pull new images with real-time download progress logs.
|
|
43
|
+
- **πΎ Volumes & Container Networks**: Inspect and manage persistent named volumes and container bridge networks.
|
|
44
|
+
- **π‘ Real-Time Daemon Event Stream**: Continuous Server-Sent Events (SSE) feed reflecting all daemon events live as they occur.
|
|
45
|
+
|
|
46
|
+
## π Quick Start
|
|
47
|
+
|
|
48
|
+
### Prerequisites
|
|
49
|
+
- **Node.js** v20 or higher
|
|
50
|
+
- **Podman** installed and accessible in `$PATH` (rootless or rootful)
|
|
51
|
+
|
|
52
|
+
### Run with `npx` (Recommended)
|
|
53
|
+
|
|
54
|
+
Launch Podmanager instantly without cloning the repository:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx podmanager
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Useful CLI options:
|
|
61
|
+
```bash
|
|
62
|
+
npx podmanager --open # Open Podmanager automatically in your browser
|
|
63
|
+
npx podmanager --port 8080 # Listen on a custom port (default: 3030)
|
|
64
|
+
npx podmanager --host 127.0.0.1 # Bind to localhost only (default: 0.0.0.0)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Run from Source (Development)
|
|
68
|
+
|
|
69
|
+
1. **Clone the repository & install dependencies:**
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/rgdlr/podmanager.git
|
|
72
|
+
cd podmanager
|
|
73
|
+
npm install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
2. **Start the application:**
|
|
77
|
+
```bash
|
|
78
|
+
npm start
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
3. Open your browser at `http://localhost:3030`.
|
|
82
|
+
|
|
83
|
+
### Environment Variables
|
|
84
|
+
|
|
85
|
+
| Variable | Default | Description |
|
|
86
|
+
| :------- | :-------- | :--------------------------------------------------------------- |
|
|
87
|
+
| `PORT` | `3030` | HTTP listening port for the web application and API |
|
|
88
|
+
| `HOST` | `0.0.0.0` | Network interface to bind to (`127.0.0.1` for local-only access) |
|
|
89
|
+
|
|
90
|
+
Example:
|
|
91
|
+
```bash
|
|
92
|
+
PORT=8080 HOST=127.0.0.1 npm start
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## π Documentation
|
|
96
|
+
|
|
97
|
+
For development workflows and API specifications, refer to our guides:
|
|
98
|
+
|
|
99
|
+
- π **[REST & SSE API Reference](apps/api/README.md)**: Full endpoint definitions, payload schemas, query parameters, and SSE event formats.
|
|
100
|
+
- π€ **[Contributing Guide](CONTRIBUTING.md)**: Local development setup, workspace commands, coding conventions, and pull request workflow.
|
|
101
|
+
|
|
102
|
+
## π Community & License
|
|
103
|
+
|
|
104
|
+
Contributions, feature requests, and bug reports are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) to get started.
|
|
105
|
+
|
|
106
|
+
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { parseArgs } = require('util');
|
|
6
|
+
const { spawn, execFileSync } = require('child_process');
|
|
7
|
+
const express = require('express');
|
|
8
|
+
const pkg = require('../package.json');
|
|
9
|
+
|
|
10
|
+
const { values } = parseArgs({
|
|
11
|
+
options: {
|
|
12
|
+
port: { type: 'string', short: 'p' },
|
|
13
|
+
host: { type: 'string', short: 'H' },
|
|
14
|
+
open: { type: 'boolean', short: 'o', default: false },
|
|
15
|
+
version: { type: 'boolean', short: 'v', default: false },
|
|
16
|
+
help: { type: 'boolean', short: 'h', default: false },
|
|
17
|
+
},
|
|
18
|
+
strict: true,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (values.help) {
|
|
22
|
+
console.log(`
|
|
23
|
+
podmanager v${pkg.version} - ${pkg.description}
|
|
24
|
+
|
|
25
|
+
Usage:
|
|
26
|
+
podmanager [options]
|
|
27
|
+
|
|
28
|
+
Options:
|
|
29
|
+
-p, --port <port> Port to listen on (default: 3030 or $PORT)
|
|
30
|
+
-H, --host <host> Host to bind to (default: 0.0.0.0 or $HOST)
|
|
31
|
+
-o, --open Open Podmanager in the default browser
|
|
32
|
+
-v, --version Show version number
|
|
33
|
+
-h, --help Show this help message
|
|
34
|
+
`);
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (values.version) {
|
|
39
|
+
console.log(pkg.version);
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let port;
|
|
44
|
+
if (values.port !== undefined) {
|
|
45
|
+
port = Number(values.port);
|
|
46
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535) {
|
|
47
|
+
console.error(`β Invalid port: ${values.port}`);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const packagedSrcDir = path.resolve(__dirname, '../src');
|
|
53
|
+
const isPackaged = fs.existsSync(path.join(packagedSrcDir, 'index.js'));
|
|
54
|
+
|
|
55
|
+
const srcDir = isPackaged
|
|
56
|
+
? packagedSrcDir
|
|
57
|
+
: path.resolve(__dirname, '../../api/src');
|
|
58
|
+
|
|
59
|
+
const uiDir = isPackaged
|
|
60
|
+
? path.resolve(__dirname, '../public')
|
|
61
|
+
: path.resolve(__dirname, '../../ui/public');
|
|
62
|
+
|
|
63
|
+
function openBrowser(url) {
|
|
64
|
+
const cmd =
|
|
65
|
+
process.platform === 'darwin'
|
|
66
|
+
? ['open', [url]]
|
|
67
|
+
: process.platform === 'win32'
|
|
68
|
+
? ['cmd', ['/c', 'start', '', url]]
|
|
69
|
+
: ['xdg-open', [url]];
|
|
70
|
+
|
|
71
|
+
const child = spawn(cmd[0], cmd[1], { stdio: 'ignore', detached: true });
|
|
72
|
+
child.on('error', () => {});
|
|
73
|
+
child.unref();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
execFileSync('podman', ['--version'], { stdio: 'ignore' });
|
|
78
|
+
} catch {
|
|
79
|
+
console.error('β Podman CLI not found in PATH. Please install Podman first: https://podman.io/docs/installation');
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const { createApp } = require(path.join(srcDir, 'app'));
|
|
84
|
+
const { startServer } = require(path.join(srcDir, 'index'));
|
|
85
|
+
|
|
86
|
+
const hostApp = express();
|
|
87
|
+
hostApp.use(express.static(uiDir));
|
|
88
|
+
hostApp.use(createApp());
|
|
89
|
+
hostApp.use((req, res, next) => {
|
|
90
|
+
if (req.method === 'GET' && !req.path.startsWith('/api')) {
|
|
91
|
+
return res.sendFile(path.join(uiDir, 'index.html'));
|
|
92
|
+
}
|
|
93
|
+
next();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
startServer({
|
|
97
|
+
port,
|
|
98
|
+
host: values.host,
|
|
99
|
+
app: hostApp,
|
|
100
|
+
onReady: ({ url }) => {
|
|
101
|
+
if (values.open) {
|
|
102
|
+
openBrowser(url);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podmanager",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The lightweight, native, and modern web based interface for Podman environments",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/rgdlr/podmanager#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/rgdlr/podmanager.git",
|
|
10
|
+
"directory": "apps/podmanager"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/rgdlr/podmanager/issues"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"podmanager": "bin/podmanager.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"bin/",
|
|
20
|
+
"src/",
|
|
21
|
+
"public/",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"prepublishOnly": "npm --prefix ../.. test",
|
|
27
|
+
"prepack": "node scripts/prepare.js",
|
|
28
|
+
"postpack": "node scripts/clean.js",
|
|
29
|
+
"start": "node bin/podmanager.js"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"express": "^5.3.0"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20.0.0"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"podmanager",
|
|
39
|
+
"podman",
|
|
40
|
+
"web-ui",
|
|
41
|
+
"containers",
|
|
42
|
+
"pods",
|
|
43
|
+
"cli"
|
|
44
|
+
]
|
|
45
|
+
}
|