Class: Kuby::Docker::Packages::Nodejs

Inherits:
Package
  • Object
show all
Defined in:
lib/kuby/docker/packages/nodejs.rb

Instance Attribute Summary

Attributes inherited from Package

#name

Instance Method Summary collapse

Methods inherited from Package

#initialize, #managed?, #with_version

Constructor Details

This class inherits a constructor from Kuby::Docker::Packages::Package

Instance Method Details

#install_on_alpine(dockerfile) ⇒ Object

T::Sig::WithoutRuntime.sig { params(dockerfile: Dockerfile).void }



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

def install_on_alpine(dockerfile)
  install_from_image("node:#{version}-alpine", dockerfile)
end

#install_on_debian(dockerfile) ⇒ Object

T::Sig::WithoutRuntime.sig { params(dockerfile: Dockerfile).void }



10
11
12
# File 'lib/kuby/docker/packages/nodejs.rb', line 10

def install_on_debian(dockerfile)
  install_from_image("node:#{version}", dockerfile)
end

#versionObject

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



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

def version
  @version || 'current'
end