Class: Kuby::Docker::Alpine

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

Constant Summary collapse

SHELL_EXE =
'/bin/sh'.freeze
DEFAULT_PACKAGES =
[
  [:ca_certificates, nil],
  [:nodejs, '12.14.1'],
  [:yarn, '1.21.1'],
  [:c_toolchain, nil],
  [:tzdata, nil],
  [:git, nil]
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Distro

#initialize

Constructor Details

This class inherits a constructor from Kuby::Docker::Distro

Instance Attribute Details

#phaseObject (readonly)

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



18
19
20
# File 'lib/kuby/docker/alpine.rb', line 18

def phase
  @phase
end

Instance Method Details

#default_packagesObject

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



28
29
30
# File 'lib/kuby/docker/alpine.rb', line 28

def default_packages
  DEFAULT_PACKAGES
end

#install(packages, into:) ⇒ Object

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



21
22
23
24
25
# File 'lib/kuby/docker/alpine.rb', line 21

def install(packages, into:)
  dockerfile = into
  install_managed(packages, dockerfile)
  install_unmanaged(packages, dockerfile)
end

#shell_exeObject

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



33
34
35
# File 'lib/kuby/docker/alpine.rb', line 33

def shell_exe
  SHELL_EXE
end