Packages
A typed Elixir wrapper for the Docker CLI with struct-based commands and pipeline composition
Current section
Files
Jump to
Current section
Files
lib/docker/commands/init.ex
defmodule Docker.Commands.Init do
@moduledoc """
Implements the `Docker.Command` behaviour for `docker init`.
"""
@behaviour Docker.Command
defstruct []
@type t :: %__MODULE__{}
def new, do: %__MODULE__{}
@impl true
def args(%__MODULE__{}), do: ["init"]
@impl true
def parse_output(stdout, 0), do: {:ok, stdout}
def parse_output(stdout, exit_code), do: {:error, {stdout, exit_code}}
end