2016-01-21 67 views

回答

0

文檔和this example快速閱讀後,它看起來就像是圖書館就是允許你按照JSON結構is used by the Docker API

對於--security-opt選項,這意味着你應該通過這個選項,因爲SecurityOptHostConfig 。我不是Ruby代碼,但可能是這樣的;

container = Docker::Container.create(
    "Cmd" => ["my", "command"], 
    "Image" => "someimage" 
    "HostConfig" => [ 
     "SecurityOpt" => ["apparmor:unconfined"] 
    ] 
    # Other configuration as needed. 
) 

希望這有助於

相關問題