diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-01 08:53:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 08:53:26 -0700 |
commit | 4fe49f5840025bc971793d1be747f0ecd9f7cc24 (patch) | |
tree | 61c59958feba846b527bf917adc09a0e1a74d625 /docs/tutorials/podman-derivative-api.md | |
parent | abb152321012f56964e01e0ff3ca223fda44cb99 (diff) | |
parent | 76120ce6388085c529d64e6bf6529dddb5681644 (diff) | |
download | podman-4fe49f5840025bc971793d1be747f0ecd9f7cc24.tar.gz podman-4fe49f5840025bc971793d1be747f0ecd9f7cc24.tar.bz2 podman-4fe49f5840025bc971793d1be747f0ecd9f7cc24.zip |
Merge pull request #4152 from mheon/move_deriv_api
Move derivitive doc so it won't be treated as a manpage
Diffstat (limited to 'docs/tutorials/podman-derivative-api.md')
-rw-r--r-- | docs/tutorials/podman-derivative-api.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/tutorials/podman-derivative-api.md b/docs/tutorials/podman-derivative-api.md new file mode 100644 index 000000000..0342bb740 --- /dev/null +++ b/docs/tutorials/podman-derivative-api.md @@ -0,0 +1,44 @@ +# How to use libpod for custom/derivative projects + +libpod today is a Golang library and a CLI. The choice of interface you make has advantages and disadvantages. + +Running as a subprocess +--- + +Advantages: + + - Many commands output JSON + - Works with languages other than Golang + - Easy to get started + +Disadvantages: + + - Error handling is harder + - May be slower + - Can't hook into or control low-level things like how images are pulled + +Vendoring into a Go project +--- + +Advantages: + + - Significant power and control + +Disadvantages: + + - You are now on the hook for container runtime security updates (partially, `runc`/`crun` are separate) + - Binary size + - Potential skew between multiple libpod versions operating on the same storage can cause problems + +Varlink +--- + +Some code exists for this; splits the difference. Future uncertain. + +Making the choice +--- + +A good question to ask first is: Do you want users to be able to use `podman` to manipulate the containers created by your project? +If so, that makes it more likely that you want to run `podman` as a subprocess. If you want a separate image store and a fundamentally +different experience; if what you're doing with containers is quite different from those created by the `podman` CLI, +that may drive you towards vendoring.
\ No newline at end of file |