2014-11-03 05:37:34 +00:00
|
|
|
<div id="create-modal" class="modal fade">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h3>Create And Start Container From Image</h3>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2015-01-25 21:52:40 +00:00
|
|
|
<form role="form">
|
|
|
|
<accordion close-others="true">
|
2015-01-25 23:59:08 +00:00
|
|
|
<accordion-group heading="Container options" is-open="menuStatus.containerOpen">
|
2014-11-03 05:37:34 +00:00
|
|
|
<fieldset>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Cmd:</label>
|
|
|
|
<input type="text" placeholder='["/bin/echo", "Hello world"]' ng-model="config.Cmd" class="form-control"/>
|
|
|
|
<small>Input commands as a raw string or JSON array</small>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Entrypoint:</label>
|
|
|
|
<input type="text" ng-model="config.Entrypoint" class="form-control" placeholder="./entrypoint.sh"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Name:</label>
|
|
|
|
<input type="text" ng-model="config.name" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Hostname:</label>
|
|
|
|
<input type="text" ng-model="config.Hostname" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Domainname:</label>
|
|
|
|
<input type="text" ng-model="config.Domainname" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>User:</label>
|
|
|
|
<input type="text" ng-model="config.User" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Memory:</label>
|
|
|
|
<input type="number" ng-model="config.Memory" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Volumes:</label>
|
|
|
|
<div ng-repeat="volume in config.Volumes">
|
|
|
|
<div class="form-group form-inline">
|
|
|
|
<input type="text" ng-model="volume.name" class="form-control" placeholder="/var/data"/>
|
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.Volumes, volume)">Remove</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.Volumes, {name: ''})">Add Volume</button>
|
|
|
|
</div>
|
2014-11-03 05:37:34 +00:00
|
|
|
</div>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="col-xs-6">
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>MemorySwap:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<input type="number" ng-model="config.MemorySwap" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>CpuShares:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<input type="number" ng-model="config.CpuShares" class="form-control"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Cpuset:</label>
|
|
|
|
<input type="text" ng-model="config.Cpuset" class="form-control" placeholder="1,2"/>
|
|
|
|
<small>Input as comma-separated list of numbers</small>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>WorkingDir:</label>
|
|
|
|
<input type="text" ng-model="config.WorkingDir" class="form-control" placeholder="/app"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>MacAddress:</label>
|
|
|
|
<input type="text" ng-model="config.MacAddress" class="form-control" placeholder="12:34:56:78:9a:bc"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="networkDisabled">NetworkDisabled:</label>
|
|
|
|
<input id="networkDisabled" type="checkbox" ng-model="config.NetworkDisabled"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="tty">Tty:</label>
|
|
|
|
<input id="tty" type="checkbox" ng-model="config.Tty"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="openStdin">OpenStdin:</label>
|
|
|
|
<input id="openStdin" type="checkbox" ng-model="config.OpenStdin"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="stdinOnce">StdinOnce:</label>
|
|
|
|
<input id="stdinOnce" type="checkbox" ng-model="config.StdinOnce"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>SecurityOpts:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div ng-repeat="opt in config.SecurityOpts">
|
|
|
|
<div class="form-group form-inline">
|
2015-01-25 23:59:08 +00:00
|
|
|
<input type="text" ng-model="opt.name" class="form-control" placeholder="label:type:svirt_apache"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.SecurityOpts, opt)">Remove</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.SecurityOpts, {name: ''})">Add Option</button>
|
2015-01-21 05:31:57 +00:00
|
|
|
</div>
|
2014-11-03 05:37:34 +00:00
|
|
|
</div>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2015-01-25 23:59:08 +00:00
|
|
|
<hr>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>Env:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div ng-repeat="envar in config.Env">
|
|
|
|
<div class="form-inline">
|
2015-01-20 07:42:08 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="sr-only">Variable Name:</label>
|
|
|
|
<input type="text" ng-model="envar.name" class="form-control" placeholder="NAME"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="sr-only">Variable Value:</label>
|
|
|
|
<input type="text" ng-model="envar.value" class="form-control" placeholder="value"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-25 23:59:08 +00:00
|
|
|
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.Env, envar)">Remove</button>
|
2015-01-20 07:42:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.Env, {name: '', value: ''})">Add environment variable</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</accordion-group>
|
2015-01-25 23:59:08 +00:00
|
|
|
<accordion-group heading="HostConfig options" is-open="menuStatus.hostConfigOpen">
|
2015-01-25 21:52:40 +00:00
|
|
|
<fieldset>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-6">
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Binds:</label>
|
|
|
|
<div ng-repeat="bind in config.HostConfig.Binds">
|
|
|
|
<div class="form-group form-inline">
|
2015-01-25 23:59:08 +00:00
|
|
|
<input type="text" ng-model="bind.name" class="form-control" placeholder="/host:/container"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.Binds, bind)">Remove</button>
|
|
|
|
</div>
|
2015-01-19 05:20:49 +00:00
|
|
|
</div>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.Binds, {name: ''})">Add Bind</button>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Links:</label>
|
|
|
|
<div ng-repeat="link in config.HostConfig.Links">
|
|
|
|
<div class="form-group form-inline">
|
|
|
|
<input type="text" ng-model="link.name" class="form-control" placeholder="web:db">
|
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.Links, link)">Remove</button>
|
|
|
|
</div>
|
2015-01-19 05:20:49 +00:00
|
|
|
</div>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.Links, {name: ''})">Add Link</button>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>Dns:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div ng-repeat="entry in config.HostConfig.Dns">
|
|
|
|
<div class="form-group form-inline">
|
|
|
|
<input type="text" ng-model="entry.name" class="form-control" placeholder="8.8.8.8"/>
|
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.Dns, entry)">Remove</button>
|
|
|
|
</div>
|
2015-01-19 05:20:49 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.Dns, {name: ''})">Add entry</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>DnsSearch:</label>
|
|
|
|
<div ng-repeat="entry in config.HostConfig.DnsSearch">
|
|
|
|
<div class="form-group form-inline">
|
2015-01-25 23:59:08 +00:00
|
|
|
<input type="text" ng-model="entry.name" class="form-control" placeholder="example.com"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.DnsSearch, entry)">Remove</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.DnsSearch, {name: ''})">Add entry</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>CapAdd:</label>
|
|
|
|
<div ng-repeat="entry in config.HostConfig.CapAdd">
|
|
|
|
<div class="form-group form-inline">
|
2015-01-25 23:59:08 +00:00
|
|
|
<input type="text" ng-model="entry.name" class="form-control" placeholder="cap_sys_admin"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.CapAdd, entry)">Remove</button>
|
|
|
|
</div>
|
2015-01-19 05:20:49 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.CapAdd, {name: ''})">Add entry</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>CapDrop:</label>
|
|
|
|
<div ng-repeat="entry in config.HostConfig.CapDrop">
|
|
|
|
<div class="form-group form-inline">
|
2015-01-25 23:59:08 +00:00
|
|
|
<input type="text" ng-model="entry.name" class="form-control" placeholder="cap_sys_admin"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
<button type="button" class="btn btn-danger btn-sm" ng-click="rmEntry(config.HostConfig.CapDrop, entry)">Remove</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.CapDrop, {name: ''})">Add entry</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-6">
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label>NetworkMode:</label>
|
|
|
|
<input type="text" ng-model="config.HostConfig.NetworkMode" class="form-control" placeholder="bridge"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="publishAllPorts">PublishAllPorts:</label>
|
|
|
|
<input id="publishAllPorts" type="checkbox" ng-model="config.HostConfig.PublishAllPorts"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="privileged">Privileged:</label>
|
|
|
|
<input id="privileged" type="checkbox" ng-model="config.HostConfig.Privileged"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>VolumesFrom:</label>
|
2015-01-25 21:52:40 +00:00
|
|
|
<div ng-repeat="volume in config.HostConfig.VolumesFrom">
|
|
|
|
<div class="form-inline">
|
|
|
|
<select ng-model="volume.name" ng-options="name for name in containerNames track by name" class="form-control"/>
|
2015-01-25 23:59:08 +00:00
|
|
|
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.VolumesFrom, volume)">Remove</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-25 23:59:08 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.VolumesFrom, {name: ''})">Add volume</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>RestartPolicy:</label>
|
|
|
|
<select ng-model="config.HostConfig.RestartPolicy.name">
|
|
|
|
<option value="">disabled</option>
|
|
|
|
<option value="always">always</option>
|
|
|
|
<option value="on-failure">on-failure</option>
|
|
|
|
</select>
|
|
|
|
<label>MaximumRetryCount:</label>
|
|
|
|
<input type="number" ng-model="config.HostConfig.RestartPolicy.MaximumRetryCount"/>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>LxcConf:</label>
|
|
|
|
<div ng-repeat="entry in config.HostConfig.LxcConf">
|
|
|
|
<div class="form-inline">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="sr-only">Name:</label>
|
|
|
|
<input type="text" ng-model="entry.name" class="form-control" placeholder="lxc.utsname"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="sr-only">Value:</label>
|
|
|
|
<input type="text" ng-model="entry.value" class="form-control" placeholder="docker"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.LxcConf, entry)">Remove</button>
|
|
|
|
</div>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.LxcConf, {name: '', value: ''})">Add Entry</button>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Devices:</label>
|
|
|
|
<div ng-repeat="device in config.HostConfig.Devices">
|
|
|
|
<div class="form-group form-inline">
|
|
|
|
<label class="sr-only">PathOnHost:</label>
|
|
|
|
<input type="text" ng-model="device.PathOnHost" class="form-control" placeholder="PathOnHost"/>
|
|
|
|
<label class="sr-only">PathInContainer:</label>
|
|
|
|
<input type="text" ng-model="device.PathInContainer" class="form-control" placeholder="PathInContainer"/>
|
|
|
|
<label class="sr-only">CgroupPermissions:</label>
|
|
|
|
<input type="text" ng-model="device.CgroupPermissions" class="form-control" placeholder="CgroupPermissions"/>
|
|
|
|
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.Devices, device)">Remove</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-28 08:28:41 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.Devices, { PathOnHost: '', PathInContainer: '', CgroupPermissions: ''})">Add Device</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-01-28 08:28:41 +00:00
|
|
|
<label>PortBindings:</label>
|
2015-01-25 23:59:08 +00:00
|
|
|
<div ng-repeat="portBinding in config.HostConfig.PortBindings">
|
2015-01-25 21:52:40 +00:00
|
|
|
<div class="form-group form-inline">
|
|
|
|
<label class="sr-only">Host IP:</label>
|
|
|
|
<input type="text" ng-model="portBinding.ip" class="form-control" placeholder="Host IP Address"/>
|
|
|
|
<label class="sr-only">Host Port:</label>
|
|
|
|
<input type="text" ng-model="portBinding.extPort" class="form-control" placeholder="Host Port"/>
|
|
|
|
<label class="sr-only">Container port:</label>
|
|
|
|
<input type="text" ng-model="portBinding.intPort" class="form-control" placeholder="Container Port"/>
|
2015-01-25 23:59:08 +00:00
|
|
|
<button class="btn btn-danger btn-xs form-control" ng-click="rmEntry(config.HostConfig.PortBindings, portBinding)">Remove</button>
|
2015-01-19 05:20:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-25 23:59:08 +00:00
|
|
|
<button type="button" class="btn btn-success btn-sm" ng-click="addEntry(config.HostConfig.PortBindings, {ip: '', extPort: '', intPort: ''})">Add Port Binding</button>
|
2015-01-25 21:52:40 +00:00
|
|
|
</div>
|
2014-11-03 05:37:34 +00:00
|
|
|
</fieldset>
|
2015-01-25 21:52:40 +00:00
|
|
|
</accordion-group>
|
|
|
|
</accordion>
|
2014-11-03 05:37:34 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2015-01-25 21:52:40 +00:00
|
|
|
<a href="" class="btn btn-primary btn-lg" ng-click="create()">Create</a>
|
2014-11-03 05:37:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-06-18 23:28:22 +00:00
|
|
|
</div>
|