Class: Kuby::Docker::Packages::Nodejs
- Defined in:
- lib/kuby/docker/packages/nodejs.rb
Instance Attribute Summary
Attributes inherited from Package
Instance Method Summary collapse
-
#install_on_alpine(dockerfile) ⇒ Object
T::Sig::WithoutRuntime.sig { params(dockerfile: Dockerfile).void }.
-
#install_on_debian(dockerfile) ⇒ Object
T::Sig::WithoutRuntime.sig { params(dockerfile: Dockerfile).void }.
-
#version ⇒ Object
T::Sig::WithoutRuntime.sig { returns(String) }.
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 |
#version ⇒ Object
T::Sig::WithoutRuntime.sig { returns(String) }
20 21 22 |
# File 'lib/kuby/docker/packages/nodejs.rb', line 20 def version @version || 'current' end |