- 
                Notifications
    
You must be signed in to change notification settings  - Fork 22
 
Added Dockerfile in order have containerized runs of tests #167
base: master
Are you sure you want to change the base?
Conversation
| 
           Can one of the admins verify this patch? 
  | 
    
| 
           @samvarankashyap Thanks for the PR! There are a bunch of optimizations we can do for this Dockerfile to make it a bit leaner and a bit more readable: If we could come up with a good way to pass in things like the inventory file, the test we want to run, and any other command line parameters for   | 
    
| 
           @miabbott Thank you for the suggestions , I will be Updating PR . I still finding a ways to pass inventories to ansible-playbook. I found have found a hack to do the same. Will be sharing them shortly.  | 
    
          
Ways to pass an inventory file into ansible-playbook run
 Personally, I feel the 2nd way is sufficient in our approach as we are sharing just the inventory_file  | 
    
| 
           @samvarankashyap I thought about this some more and did some more testing on my side. I wanted to solve the following problems: 
 This required some additional work to the the Dockerfile and the inclusion of a helper script. I'll just show my work here: The Dockerfile looks mostly the same, but now pulls in the helper script and sets it as the entrypoint. The helper script does a simple check to make sure there is a  Now after building the container (mine is named  
 In this example I'm able to: 
 This worked in a simple test against a remote host; I think it should work if you run the container on the host under test (with the exception of the tests that reboot the host). What do you think?  | 
    
| 
           @miabbott : Introducing a script as an entry point to a container sounds like a brilliant idea.  | 
    
| 
           @samvarankashyap Please do! I hope we can make this container robust enough to handle many scenarios, so please test as much as you can. 👍  | 
    
| 
           @samvarankashyap I think we are getting closer to having this ready, but it occurred to me that in its current form, the Docker image that will result from the Dockerfile will have a static checkout of the repo. Could you modify the helper script to do a fresh clone of the repo before running the test? Also, if you could add some documentation in the README about how to use the Docker image, that would be useful.  | 
    
9a3c79c    to
    c48e908      
    Compare
  
    c48e908    to
    40ec4ae      
    Compare
  
    | 
           @samvarankashyap LGTM. Like @miabbott mentioned some documentation in the README would be useful.  | 
    
$Subject
Any additions/suggestions to the dockerfile are highly appreciated.