Class: Kuby::Docker::Alpine

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

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(phase) ⇒ Alpine

Returns a new instance of Alpine.



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

def initialize(phase)
  @phase = phase
end

Instance Attribute Details

#phaseObject (readonly)

Returns the value of attribute phase.



15
16
17
# File 'lib/kuby/docker/alpine.rb', line 15

def phase
  @phase
end

Instance Method Details

#default_packagesObject



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

def default_packages
  DEFAULT_PACKAGES
end

#install(packages, into:) ⇒ Object



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



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

def shell_exe
  SHELL_EXE
end