22.15. docker-context - Docker (OCI) Execution Context

The following documentation is for Docker (OCI) Execution Context (docker-context) content package at version .

The OCI container execution context plugin (docker-context) provides the methods needed implement Context support based on OCI compatible container images. This plugin provider supports creating and running contexts as Linux containers using either the Podman or Docker container management systems. It provides actions for loading and saving OCI compliant images and creating and destroying containers.

If you are using Docker, then the user you are running dr-provision must be have access to the Docker daemon. See [docker documentation] for more details.

[docker documentation]: https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user

If you are using Podman, and you are running as a non-root user, you must make sure that the user you are running as has the ability to enter and leave user namespaces. See [podman dockumentation] for more information on what is required.

[podman documentation]: https://github.com/containers/libpod/blob/master/docs/podman.1.md#rootless-mode

There are specific requirements that the images this plugin uses must meet:

  • All of the tools that any tasks using this container require must

    be added during the container build process. In general, it is a good idea to include bash, jq, and curl.

  • The image must be tagged with the name referred to in the Image

    field of the Context and a version.

  • The ENTRYPOINT will be bind-mounted automatically by the docker-context plugin using

    /usr/bin/drpcli machines processjobs

  • PATH in the container will default to

    PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

See [Setting Up Docker Contexts](../../../operators/operations/contexts) for more information.

22.15.1. Object Specific Documentation

22.15.1.1. params

The content package provides the following params.

22.15.1.1.1. docker-context/owner

This parameter provides the owner of the docker-context. The default value is docker-context.

22.15.1.1.2. docker-context/podman-force-no-bind

This parameter is used to force container to not use bind mounts if true and the container engine is podman.

The default value is false.

22.15.1.1.3. docker-context/podman-tmp-dir

This parameter defines the tmp dir that should be used for podman containers.

The default value is /var/tmp.