Method: Dockerspec::Builder::ConfigHelpers#cmd

Defined in:
lib/dockerspec/builder/config_helpers.rb

#cmdArray

Returns the image command (CMD).

Examples:

Basic RSpec Example

describe docker_build(path: '.') do
  its(:cmd) { should eq ['/usr/bin/supervisord'] }
end

RSpec Example Using Have Matchers

describe docker_build(path: '.') do
  it { should have_cmd ['/usr/bin/supervisord'] }
  # Or in string format:
  it { should have_cmd '/usr/bin/supervisord' }
end

Returns:

  • (Array)

    The image command.



138
139
140
# File 'lib/dockerspec/builder/config_helpers.rb', line 138

def cmd
  image_config['Cmd']
end