Class: Kuby::Docker::Distro

Inherits:
Object
  • Object
show all
Defined in:
lib/kuby/docker/distro.rb

Direct Known Subclasses

Alpine, Debian

Instance Method Summary collapse

Constructor Details

#initialize(phase) ⇒ Distro

T::Sig::WithoutRuntime.sig { params(phase: Layer).void }



20
21
22
# File 'lib/kuby/docker/distro.rb', line 20

def initialize(phase)
  @phase = phase
end

Instance Method Details

#default_packagesObject

T::Sig::WithoutRuntime.sig { returns(T::Array[[Symbol, T.nilable(String)]]) }

Raises:

  • (NotImplementedError)


31
32
33
34
# File 'lib/kuby/docker/distro.rb', line 31

def default_packages
  raise NotImplementedError,
    "#{__method__} must be defined in derived classes"
end

#install(packages, into:) ⇒ Object

T::Sig::WithoutRuntime.sig { params(packages: T::Array, into: Dockerfile).void }

Raises:

  • (NotImplementedError)


25
26
27
28
# File 'lib/kuby/docker/distro.rb', line 25

def install(packages, into:)
  raise NotImplementedError,
    "#{__method__} must be defined in derived classes"
end

#shell_exeObject

T::Sig::WithoutRuntime.sig { returns(String) }

Raises:

  • (NotImplementedError)


37
38
39
40
# File 'lib/kuby/docker/distro.rb', line 37

def shell_exe
  raise NotImplementedError,
    "#{__method__} must be defined in derived classes"
end