test-kitchen / kitchen-docker

A Test Kitchen Driver for Docker
Apache License 2.0
462 stars 232 forks source link

Support amazonlinux container #242

Closed tjj9020 closed 4 years ago

tjj9020 commented 7 years ago

It would be nice to support the new amazonlinux docker container.

https://hub.docker.com/_/amazonlinux/

LevonBecker commented 7 years ago

+1

Here's my current workaround:

https://www.bonusbits.com/wiki/HowTo:Configure_Amazon_Linux_Docker_Image_for_Test_Kitchen_in_Chef_Cookbook

myoung34 commented 7 years ago

Any news on this?

LevonBecker commented 7 years ago

This works for me... you have to specific platform: rhel

---
verifier:
  name: inspec
  format: <%= ENV['CI'] ? 'junit' : 'cli' %>
  <% if ENV['CI'] %>
  output: "test-reports/%{platform}_%{suite}_inspec.xml"
  <% end %>

driver:
  name: docker
  use_sudo: false
  privileged: true
  forward: 80
  driver_config:
    ssl_verify_mode: ":verify_none"

provisioner:
  name: chef_zero
  always_update_cookbooks: true
  require_chef_omnibus: 12.19.36

platforms:
  - name: amazon-docker
    driver_config:
      image: amazonlinux:latest
      platform: rhel

suites:
  - name: default
    run_list:
      - recipe[example_serverspec_to_inspec::default]
    attributes:
tristanmorgan commented 6 years ago

T.K. will determine the image to use if you specify the name like the following.

platforms:
  - name: amazonlinux-2017.09
    driver_config:
      platform: rhel
jeffreycoe commented 4 years ago

Closing issue as amazonlinux image support was added in version 2.9.0.