Class: Avmtrf1::Php::DockerImage

Inherits:
Docker::Image
  • Object
show all
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
XDEBUG_PECL_PACKAGE_LESSER_7 =
'xdebug-2.5.5'
XDEBUG_PECL_PACKAGE_GREATER_EQUAL =
'xdebug'

Instance Method Summary collapse

Methods inherited from Docker::Image

#generator_version, #plataform_stereotype_tag, #stereotype_tag

Instance Method Details

#mcrypt_installObject


22
23
24
25
26
27
28
# File 'lib/avmtrf1/php/docker_image.rb', line 22

def mcrypt_install
  if ::Gem::Version.new(plataform_version) >= ::Gem::Version.new('7.2')
    MCRYPT_INSTALL_GREATER_EQUAL_7_2
  else
    MCRYPT_INSTALL_LESSER_7_2
  end
end

#xdebug_pecl_packageObject


30
31
32
33
34
35
36
# File 'lib/avmtrf1/php/docker_image.rb', line 30

def xdebug_pecl_package
  if ::Gem::Version.new(plataform_version) < ::Gem::Version.new('7')
    XDEBUG_PECL_PACKAGE_LESSER_7
  else
    XDEBUG_PECL_PACKAGE_GREATER_EQUAL
  end
end