- Rust 99.9%
|
|
||
|---|---|---|
| docs | ||
| src | ||
| tests | ||
| .gitignore | ||
| .rustfmt.toml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
pod container manager
pod is a short, simple wrapper around the podman CLI, making it easier to build and tag images, run containers for development, and push those containers to production.
Install
Install by cloning the repo then running:
$ cargo install --path .
Overview
Just define your images and containers in a pods.json config file, see the config format documentation for more info.
{
"images": {
"my-image": {
"tag": "example:latest",
"from": "Containerfile"
}
},
"development": {
"dev": {
"image": ":my-image"
}
},
"containers": {
"prod": {
"name": "my-container-prod",
"image": ":my-image",
"expose": 2301,
"volumes": {
"my-project-config": "/config"
},
"flags": {
"do_it_for_real": true
}
}
}
}
Then you can:
pod buildto create a new image with the right tagpod runto run the dev container—with bind mounts for the current directory already configuredpod enterto run a shell in a container to run project-specific toolspod updateto compare the config to existing containers and update anything that is out of sync, with a full diff:
Update: my-container@prod (running since 1d21h ago)
image:
- my-container:latest@abc123def456 (3d6h ago)
+ my-container:latest@def654abc321 (1h4m18s ago)
args:
podman
run
--restart=always
--pull=newer
--detach=true
+ --mount=type=volume,src=my-project-config,dst=/config
--publish=:2301
--name=my-project
--hostname=my-project
my-project:latest
--do_it_for_real=true
Comparison
Pod is written primarily for my own use, and so it does the things that I want and very little else.
{Docker,Podman} Compose
Docker compose is aimed towards more complicated deployments where you have dependencies between containers, so they have to be started and stopped in a particular order. It doesn't appear to me that it has a low-effort way to run a container as part of a development loop, instead it's more geared towards running a server that supports hot code reloading or recompilation.
It also doesn't seem to have a diff mode that shows the changes that an update will perform.
Quadlets
Quadlets are a way to run Podman containers as systemd units. I think this is great for a set-and-forget deployment, as it supports auto-updating, restarts, etc. It can be deployed to a host via the systemd config files, which is great if you want to setup a system that will run a couple of containerised services and manage them the same was as non-containerised services run by systemd.
It doesn't have any affordance for development—it's only for deployment—and doesn't appear to have a comparison functionality.
Kubernetes
The biggest difference between pod and Kubernetes is that I know how pod works.