Class: Avmtrf1::Php::DockerImage
- Inherits:
-
Docker::Image
- Object
- Avm::Docker::Image
- Docker::Image
- Avmtrf1::Php::DockerImage
- Defined in:
- lib/avmtrf1/php/docker_image.rb
Constant Summary collapse
- MCRYPT_INSTALL_GREATER_EQUAL_7_2 =
<<~DOCKERFILE RUN pecl install mcrypt RUN echo extension=mcrypt.so > "$PHP_INI_DIR/conf.d/mcrypt.ini" DOCKERFILE
- MCRYPT_INSTALL_LESSER_7_2 =
<<~DOCKERFILE RUN docker-php-ext-install mcrypt DOCKERFILE
Instance Attribute Summary collapse
-
#php_version ⇒ Object
readonly
Returns the value of attribute php_version.
Instance Method Summary collapse
-
#initialize(registry, php_version) ⇒ DockerImage
constructor
A new instance of DockerImage.
- #mcrypt_install ⇒ Object
- #stereotype_tag ⇒ Object
- #template_dir ⇒ Object
Methods inherited from Docker::Image
Constructor Details
#initialize(registry, php_version) ⇒ DockerImage
Returns a new instance of DockerImage.
23 24 25 26 |
# File 'lib/avmtrf1/php/docker_image.rb', line 23 def initialize(registry, php_version) super(registry) @php_version = php_version end |
Instance Attribute Details
#php_version ⇒ Object (readonly)
Returns the value of attribute php_version.
21 22 23 |
# File 'lib/avmtrf1/php/docker_image.rb', line 21 def php_version @php_version end |
Instance Method Details
#mcrypt_install ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/avmtrf1/php/docker_image.rb', line 36 def mcrypt_install if ::Gem::Version.new(php_version) >= ::Gem::Version.new('7.2') MCRYPT_INSTALL_GREATER_EQUAL_7_2 else MCRYPT_INSTALL_LESSER_7_2 end end |
#stereotype_tag ⇒ Object
28 29 30 |
# File 'lib/avmtrf1/php/docker_image.rb', line 28 def stereotype_tag "php-#{php_version}" end |
#template_dir ⇒ Object
32 33 34 |
# File 'lib/avmtrf1/php/docker_image.rb', line 32 def template_dir ::Avmtrf1.template('avmtrf1/php/docker_image') end |