Documentation
¶
Overview ¶
Package docker implements RuntimeAdapter using the Docker Engine API. Requires /var/run/docker.sock to be mounted into the platform container.
Index ¶
- type Runtime
- func (r *Runtime) Deploy(ctx context.Context, spec runtime.ContainerSpec) error
- func (r *Runtime) Endpoint(_ context.Context, id string, port int) (string, error)
- func (r *Runtime) Logs(ctx context.Context, id string, lines int) ([]string, error)
- func (r *Runtime) Remove(ctx context.Context, id string) error
- func (r *Runtime) Start(ctx context.Context, id string) error
- func (r *Runtime) Status(ctx context.Context, id string) (runtime.ContainerStatus, error)
- func (r *Runtime) Stop(ctx context.Context, id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime implements runtime.RuntimeAdapter using the Docker Engine API.
func New ¶
New creates a DockerRuntime. networkName is the Docker network plugins are attached to (default: "kleff").
func (*Runtime) Deploy ¶
Deploy pulls the image and starts the container, replacing any existing one.
func (*Runtime) Endpoint ¶
Endpoint returns the Docker-network hostname:port for the container. Docker's embedded DNS resolves the container name within the shared network.
Click to show internal directories.
Click to hide internal directories.