Download an archive
Use a raw endpoint:containerArchive()’s default generated result is null,
so it does not retain the tar body for you. This example saves an archive of
/etc from an existing development container. Pick an output filename which
does not already exist; xb prevents overwriting a local file.
containerExport() uses the same raw-body
pattern for a container filesystem export; it is not an image save or a backup
of mounted volume data.
Read path metadata
The HEAD endpoint returns metadata inX-Docker-Container-Path-Stat, not a
response body. Decode its base64-encoded JSON value:
Upload a tar archive
Createupload.tar containing only files intended for the destination. The
destination directory must already exist in the container. Uploading can
overwrite files, so use a development container and a dedicated path.
noOverwriteDirNonDir prevents replacing a directory with a non-directory
or vice versa. It does not prevent replacing an existing regular file.
copyUIDGID, if needed, is also a string-valued query option in this API line.
The convenience putContainerArchive() call uses the same tar request shape
and returns null on successful typed parsing.