https://github.com/linbit/containerapi
Go bindings to manage containers in a runtime agnostic way (Docker, podman)
https://github.com/linbit/containerapi
Last synced: about 1 year ago
JSON representation
Go bindings to manage containers in a runtime agnostic way (Docker, podman)
- Host: GitHub
- URL: https://github.com/linbit/containerapi
- Owner: LINBIT
- Created: 2020-09-08T09:35:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-05T08:15:10.000Z (almost 2 years ago)
- Last Synced: 2025-04-02T19:11:34.971Z (about 1 year ago)
- Language: Go
- Size: 558 KB
- Stars: 3
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# containerapi
Go bindings to manage containers in a runtime agnostic way.
Currently supports:
* Docker
* Podman >= 4.0.0.
## Why?
While Podman and Docker API is mostly compatible, we noticed instances where the exact behaviour was slightly different.
Having a small set of primitives to cover the most basic container use cases, we can check for divergent behaviour
in CI and ensure we offer a consistent API for both.
## Development
We use [`virter`](https://github.com/linbit/virter) for provisioning development machines.
### Run tests
```
go test ./...
```
Run podman tests in a VM:
```
virter vm run --name podman-test --id 101 --provision virter/provision-podman.toml alma-8
virter vm exec --provision virter/exec-test.toml podman-test
```
Run docker tests in a VM:
```
virter vm run --name docker-test --id 102 --provision virter/provision-docker.toml alma-8
virter vm exec --provision virter/exec-test.toml docker-test
```