Class: Avmtrf1::Docker::Image

Inherits:
Avm::Docker::Image
  • Object
show all
Defined in:
lib/avmtrf1/docker/image.rb

Direct Known Subclasses

NodeJs::DockerImage, Php::DockerImages::Base

Constant Summary collapse

APT_SETUP =
<<CODE
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y dist-upgrade
CODE
DEBIAN_STRETCH_FIX_SOURCES =
<<CODE
RUN echo 'deb http://security.debian.org/debian-security stable-security/updates main' > /etc/apt/sources.list
RUN echo 'deb http://archive.debian.org/debian stretch main' >> /etc/apt/sources.list
CODE
DEBIAN_STRETCH_APT_SETUP =
DEBIAN_STRETCH_FIX_SOURCES + APT_SETUP

Instance Method Summary collapse

Instance Method Details

#apt_setupString

Returns:

  • (String)


27
28
29
# File 'lib/avmtrf1/docker/image.rb', line 27

def apt_setup
  APT_SETUP
end

#debian_stretch_apt_setupString

Returns:

  • (String)


32
33
34
# File 'lib/avmtrf1/docker/image.rb', line 32

def debian_stretch_apt_setup
  DEBIAN_STRETCH_APT_SETUP
end

#generator_versionObject



44
45
46
# File 'lib/avmtrf1/docker/image.rb', line 44

def generator_version
  ::Avmtrf1::Tools::VERSION
end

#platform_stereotype_tagObject



36
37
38
# File 'lib/avmtrf1/docker/image.rb', line 36

def platform_stereotype_tag
  self.class.name.split('::')[-2].underscore.dasherize
end

#stereotype_tagObject



40
41
42
# File 'lib/avmtrf1/docker/image.rb', line 40

def stereotype_tag
  "#{platform_stereotype_tag}-#{platform_version}"
end