Class: Avmtrf1::Php::DockerImages::Base

Inherits:
Docker::Image
  • Object
show all
Defined in:
lib/avmtrf1/php/docker_images/base.rb

Direct Known Subclasses

V5, V7

Constant Summary collapse

GD_OPTIONS =
%w[--with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir
--with-xpm-dir --with-freetype-dir].freeze
PLATFORM_STEREOTYPE_TAG =
'php'

Constants inherited from Docker::Image

Docker::Image::APT_SETUP, Docker::Image::DEBIAN_STRETCH_APT_SETUP, Docker::Image::DEBIAN_STRETCH_FIX_SOURCES

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Docker::Image

#apt_setup, #debian_stretch_apt_setup, #generator_version, #stereotype_tag

Class Method Details

.php_versionGem::Version

Returns:

  • (Gem::Version)


20
21
22
# File 'lib/avmtrf1/php/docker_images/base.rb', line 20

def php_version
  const_get('PHP_VERSION')
end

Instance Method Details

#gd_optionsObject



38
39
40
# File 'lib/avmtrf1/php/docker_images/base.rb', line 38

def gd_options
  GD_OPTIONS.join(' ')
end

#php_dist_curl_argsString

Returns:

  • (String)


26
27
28
# File 'lib/avmtrf1/php/docker_images/base.rb', line 26

def php_dist_curl_args
  '-sS "https://www.php.net/distributions/php-$PHP_VERSION.tar.gz"'
end

#platform_stereotype_tagObject



30
31
32
# File 'lib/avmtrf1/php/docker_images/base.rb', line 30

def platform_stereotype_tag
  PLATFORM_STEREOTYPE_TAG
end

#write_in_provide_dirObject



34
35
36
# File 'lib/avmtrf1/php/docker_images/base.rb', line 34

def write_in_provide_dir
  ::Avmtrf1::Php::DockerImages::Base.template.apply(self, provide_dir)
end

#xdebug_installString

Returns:

  • (String)


43
44
45
# File 'lib/avmtrf1/php/docker_images/base.rb', line 43

def xdebug_install
  "RUN pecl install #{xdebug_pecl_package}"
end