Create new container using api?

Is it possible to create new container using API? Couldn’t find it in the API docs.

Want I’m trying to achieve is this:
we use GIT CI tools to run test cases, if all passes, i want to call API to spin up a container with a couple of ENV variables and the branch name, so that new container can pull in code form that particular branch on start and remain active for manual testing.

Thank you

http://docs.rancher.com/rancher/api/api-resources/container/#operations

can i use /container end point to create container in stack ?

If someone else gets here via google… the best way to figure this out is with the debug console in chrome. If you add your container through the UI and then check the network tab of the debug console, you will get the exact data you need to recreate your container algorithmically. I would assume the same is true for everything else through the web ui.

2 Likes