Docs: Add docs to access APIs inside container

Signed-off-by: xcffl <2216902+xcffl@users.noreply.github.com>
This commit is contained in:
xcffl
2021-03-09 22:30:27 +08:00
parent 09473d4300
commit dc0c72a48b

View File

@ -13,6 +13,10 @@ If no endpoint is provided, defaults will be used. The default endpoint for a r
service is *unix:/run/podman/podman.sock* and rootless is *unix:/$XDG_RUNTIME_DIR/podman/podman.sock* (for
example *unix:/run/user/1000/podman/podman.sock*)
To access the API service inside a container:
- mount the socket as a volume
- run the container with `--security-opt label:disable`
The REST API provided by **podman system service** is split into two parts: a compatibility layer offering support for the Docker v1.40 API, and a Podman-native Libpod layer.
Documentation for the latter is available at *https://docs.podman.io/en/latest/_static/api.html*.
Both APIs are versioned, but the server will not reject requests with an unsupported version set.