2016-07-06 00:19:09 +00:00
< rd-header >
2018-06-06 16:12:35 +00:00
< rd-header-title title-text = "Create container" > < / rd-header-title >
2020-04-10 21:54:53 +00:00
< rd-header-content > < a ui-sref = "docker.containers" > Containers< / a > > Add container < / rd-header-content >
2016-07-06 00:19:09 +00:00
< / rd-header >
< div class = "row" >
< div class = "col-lg-12 col-md-12 col-xs-12" >
< rd-widget >
< rd-widget-body >
2017-11-20 13:34:14 +00:00
< form class = "form-horizontal" autocomplete = "off" >
2016-07-06 00:19:09 +00:00
<!-- name - input -->
< div class = "form-group" >
< label for = "container_name" class = "col-sm-1 control-label text-left" > Name< / label >
< div class = "col-sm-11" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.name" id = "container_name" placeholder = "e.g. myContainer" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !name - input -->
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12 form-section-title" >
Image configuration
< / div >
2019-11-27 22:36:39 +00:00
< div ng-if = "!formValues.RegistryModel.Registry && fromContainer" >
2017-09-05 14:42:20 +00:00
< i class = "fa fa-exclamation-triangle orange-icon" aria-hidden = "true" > < / i >
2020-04-10 21:54:53 +00:00
< span class = "small text-danger" style = "margin-left: 5px;"
>The Docker registry for the < code > {{ config.Image }}< / code > image is not registered inside Portainer, you will not be able to create a container. Please register
that registry first.< /span
>
2016-07-06 00:19:09 +00:00
< / div >
2019-11-27 22:36:39 +00:00
< div ng-if = "formValues.RegistryModel.Registry || !fromContainer" >
2017-09-05 14:42:20 +00:00
<!-- image - and - registry -->
2018-07-03 18:31:02 +00:00
< por-image-registry
2019-11-27 22:36:39 +00:00
model="formValues.RegistryModel"
pull-warning="formValues.alwaysPull"
ng-if="formValues.RegistryModel.Registry"
2018-07-03 18:31:02 +00:00
auto-complete="true"
2020-04-10 21:54:53 +00:00
label-class="col-sm-1"
input-class="col-sm-11"
2018-07-03 18:31:02 +00:00
>< / por-image-registry >
2017-09-05 14:42:20 +00:00
<!-- !image - and - registry -->
<!-- always - pull -->
< div class = "form-group" >
< div class = "col-sm-12" >
< label for = "ownership" class = "control-label text-left" >
Always pull the image
2020-04-10 21:54:53 +00:00
< portainer-tooltip
position="bottom"
message="When enabled, Portainer will automatically try to pull the specified image before creating the container."
>< / portainer-tooltip >
2017-09-05 14:42:20 +00:00
< / label >
2020-04-10 21:54:53 +00:00
< label class = "switch" style = "margin-left: 20px;" > < input type = "checkbox" ng-model = "formValues.alwaysPull" / > < i > < / i > < / label >
2017-09-05 14:42:20 +00:00
< / div >
2017-03-27 12:44:39 +00:00
< / div >
2017-09-05 14:42:20 +00:00
<!-- !always - pull -->
2017-03-27 12:44:39 +00:00
< / div >
< div class = "col-sm-12 form-section-title" >
2019-07-10 05:16:43 +00:00
Network ports configuration
2017-03-27 12:44:39 +00:00
< / div >
<!-- publish - exposed - ports -->
< div class = "form-group" >
< div class = "col-sm-12" >
< label class = "control-label text-left" >
2019-07-10 05:16:43 +00:00
Publish all exposed network ports to random host ports
2020-04-10 21:54:53 +00:00
< portainer-tooltip
position="bottom"
message="When enabled, Portainer will let Docker automatically map a random port on the host to each one defined in the image Dockerfile."
>< / portainer-tooltip >
2016-10-27 07:05:37 +00:00
< / label >
2020-04-10 21:54:53 +00:00
< label class = "switch" style = "margin-left: 20px;" > < input type = "checkbox" ng-model = "config.HostConfig.PublishAllPorts" / > < i > < / i > < / label >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
2017-03-27 12:44:39 +00:00
<!-- !publish - exposed - ports -->
2016-07-06 00:19:09 +00:00
<!-- port - mapping -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" >
2019-10-15 09:13:57 +00:00
< label class = "control-label text-left" >
Manual network port publishing
2020-04-10 21:54:53 +00:00
< portainer-tooltip
position="bottom"
message="When a range of ports on the host and a single port on the container is specified, Docker will randomly choose a single available port in the defined range and forward that to the container port."
>< / portainer-tooltip >
2019-10-15 09:13:57 +00:00
< / label >
2017-03-27 12:44:39 +00:00
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addPortBinding()" >
2019-07-10 05:16:43 +00:00
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > publish a new network port
2016-07-06 00:19:09 +00:00
< / span >
< / div >
<!-- port - mapping - input - list -->
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
2016-07-06 00:19:09 +00:00
< div ng-repeat = "portBinding in config.HostConfig.PortBindings" style = "margin-top: 2px;" >
2017-03-27 12:44:39 +00:00
<!-- host - port -->
< div class = "input-group col-sm-4 input-group-sm" >
2016-07-06 00:19:09 +00:00
< span class = "input-group-addon" > host< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "portBinding.hostPort" placeholder = "e.g. 80, 80-88, ip:80 or ip:80-88 (optional)" / >
2016-07-06 00:19:09 +00:00
< / div >
2017-03-27 12:44:39 +00:00
<!-- !host - port -->
< span style = "margin: 0 10px 0 10px;" >
2018-03-13 05:36:53 +00:00
< i class = "fa fa-long-arrow-alt-right" aria-hidden = "true" > < / i >
2017-03-27 12:44:39 +00:00
< / span >
<!-- container - port -->
< div class = "input-group col-sm-4 input-group-sm" >
2016-07-06 00:19:09 +00:00
< span class = "input-group-addon" > container< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "portBinding.containerPort" placeholder = "e.g. 80 or 80-88" / >
2016-07-06 00:19:09 +00:00
< / div >
2017-03-27 12:44:39 +00:00
<!-- !container - port -->
<!-- protocol - actions -->
< div class = "input-group col-sm-3 input-group-sm" >
< div class = "btn-group btn-group-sm" >
< label class = "btn btn-primary" ng-model = "portBinding.protocol" uib-btn-radio = "'tcp'" > TCP< / label >
< label class = "btn btn-primary" ng-model = "portBinding.protocol" uib-btn-radio = "'udp'" > UDP< / label >
< / div >
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removePortBinding($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
2016-07-06 00:19:09 +00:00
< / div >
2017-03-27 12:44:39 +00:00
<!-- !protocol - actions -->
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !port - mapping - input - list -->
< / div >
<!-- !port - mapping -->
2018-07-23 09:31:21 +00:00
< div ng-if = "applicationState.endpoint.mode.agentProxy && applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'" >
2018-05-06 07:15:57 +00:00
< div class = "col-sm-12 form-section-title" >
Deployment
< / div >
<!-- node - selection -->
2020-04-10 21:54:53 +00:00
< node-selector model = "formValues.NodeName" > < / node-selector >
2018-05-06 07:15:57 +00:00
<!-- !node - selection -->
< / div >
2017-05-23 18:56:10 +00:00
<!-- access - control -->
2020-06-09 09:55:36 +00:00
< por-access-control-form form-data = "formValues.AccessControlData" resource-control = "fromContainer.ResourceControl" ng-if = "fromContainer" > < / por-access-control-form >
2017-05-23 18:56:10 +00:00
<!-- !access - control -->
2017-03-27 12:44:39 +00:00
<!-- actions -->
< div class = "col-sm-12 form-section-title" >
Actions
< / div >
2019-02-25 00:09:09 +00:00
<!-- autoremove -->
2017-03-27 12:44:39 +00:00
< div class = "form-group" >
2019-02-24 20:48:31 +00:00
< div class = "col-sm-12" >
< label for = "ownership" class = "control-label text-left" >
Auto remove
2020-04-10 21:54:53 +00:00
< portainer-tooltip
position="bottom"
message="When enabled, Portainer will automatically remove the container when it exits. This is useful when you want to use the container only once."
>< / portainer-tooltip >
2019-02-24 20:48:31 +00:00
< / label >
2020-04-10 21:54:53 +00:00
< label class = "switch" style = "margin-left: 20px;" > < input type = "checkbox" ng-model = "config.HostConfig.AutoRemove" / > < i > < / i > < / label >
2019-02-24 20:48:31 +00:00
< / div >
2019-02-25 00:09:09 +00:00
< / div >
<!-- !autoremove -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" >
2020-04-10 21:54:53 +00:00
< button
type="button"
class="btn btn-primary btn-sm"
2019-11-27 22:36:39 +00:00
ng-disabled="state.actionInProgress || !formValues.RegistryModel.Image || (!formValues.RegistryModel.Registry & & fromContainer)"
2020-04-10 21:54:53 +00:00
ng-click="create()"
button-spinner="state.actionInProgress"
>
2017-11-12 21:39:12 +00:00
< span ng-hide = "state.actionInProgress" > Deploy the container< / span >
< span ng-show = "state.actionInProgress" > Deployment in progress...< / span >
2017-11-12 19:27:28 +00:00
< / button >
2018-08-18 08:27:24 +00:00
< span class = "text-danger" ng-if = "state.formValidationError" style = "margin-left: 5px;" > {{ state.formValidationError }}< / span >
2017-03-27 12:44:39 +00:00
< / div >
< / div >
<!-- !actions -->
2016-07-06 00:19:09 +00:00
< / form >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >
< div class = "row" >
< div class = "col-lg-12 col-md-12 col-xs-12" >
< rd-widget >
2018-06-06 16:12:35 +00:00
< rd-widget-header icon = "fa-cog" title-text = "Advanced container settings" > < / rd-widget-header >
2016-07-06 00:19:09 +00:00
< rd-widget-body >
2017-03-27 12:44:39 +00:00
< ul class = "nav nav-pills nav-justified" >
2018-10-28 03:00:56 +00:00
< li class = "active interactive" > < a data-target = "#command" data-toggle = "tab" > Command & logging< / a > < / li >
2016-10-27 08:33:39 +00:00
< li class = "interactive" > < a data-target = "#volumes" data-toggle = "tab" > Volumes< / a > < / li >
< li class = "interactive" > < a data-target = "#network" data-toggle = "tab" > Network< / a > < / li >
2017-03-27 12:44:39 +00:00
< li class = "interactive" > < a data-target = "#env" data-toggle = "tab" > Env< / a > < / li >
2016-12-25 20:33:14 +00:00
< li class = "interactive" > < a data-target = "#labels" data-toggle = "tab" > Labels< / a > < / li >
2017-03-27 12:44:39 +00:00
< li class = "interactive" > < a data-target = "#restart-policy" data-toggle = "tab" > Restart policy< / a > < / li >
2017-10-04 06:39:59 +00:00
< li class = "interactive" > < a data-target = "#runtime-resources" ng-click = "refreshSlider()" data-toggle = "tab" > Runtime & Resources< / a > < / li >
2018-08-09 08:40:06 +00:00
< li class = "interactive" > < a data-target = "#container-capabilities" data-toggle = "tab" > Capabilities< / a > < / li >
2016-07-06 00:19:09 +00:00
< / ul >
<!-- tab - content -->
< div class = "tab-content" >
<!-- tab - command -->
< div class = "tab-pane active" id = "command" >
< form class = "form-horizontal" style = "margin-top: 15px;" >
<!-- command - input -->
< div class = "form-group" >
2019-01-22 23:25:42 +00:00
< label for = "container_command" class = "col-sm-2 col-lg-1 control-label text-left" > Command< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.Cmd" id = "container_command" placeholder = "e.g. /usr/bin/nginx -t -c /mynginx.conf" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !command - input -->
<!-- entrypoint - input -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_entrypoint" class = "col-sm-2 col-lg-1 control-label text-left" > Entry Point< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.Entrypoint" id = "container_entrypoint" placeholder = "e.g. /bin/sh -c" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !entrypoint - input -->
<!-- workdir - user - input -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_workingdir" class = "col-sm-2 col-lg-1 control-label text-left" > Working Dir< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-4" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.WorkingDir" id = "container_workingdir" placeholder = "e.g. /myapp" / >
2016-07-06 00:19:09 +00:00
< / div >
< label for = "container_user" class = "col-sm-1 control-label text-left" > User< / label >
< div class = "col-sm-4" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.User" id = "container_user" placeholder = "e.g. nginx" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !workdir - user - input -->
<!-- console -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_console" class = "col-sm-2 col-lg-1 control-label text-left" > Console< / label >
< div class = "col-sm-10 col-lg-11" >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-4" >
< label class = "radio-inline" >
2020-04-10 21:54:53 +00:00
< input type = "radio" name = "container_console" ng-model = "formValues.Console" value = "both" / >
2016-07-06 00:19:09 +00:00
Interactive & TTY < span class = "small text-muted" > (-i -t)< / span >
< / label >
< / div >
< div class = "col-sm-4" >
< label class = "radio-inline" >
2020-04-10 21:54:53 +00:00
< input type = "radio" name = "container_console" ng-model = "formValues.Console" value = "interactive" / >
2016-07-06 00:19:09 +00:00
Interactive < span class = "small text-muted" > (-i)< / span >
< / label >
< / div >
< / div >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-offset-2 col-sm-10 col-lg-offset-1 col-lg-11" >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-4" >
< label class = "radio-inline" >
2020-04-10 21:54:53 +00:00
< input type = "radio" name = "container_console" ng-model = "formValues.Console" value = "tty" / >
2016-07-06 00:19:09 +00:00
TTY < span class = "small text-muted" > (-t)< / span >
< / label >
< / div >
< div class = "col-sm-4" >
< label class = "radio-inline" >
2020-04-10 21:54:53 +00:00
< input type = "radio" name = "container_console" ng-model = "formValues.Console" value = "none" / >
2016-07-06 00:19:09 +00:00
None
< / label >
< / div >
< / div >
< / div >
<!-- !console -->
2018-10-28 03:00:56 +00:00
< div class = "col-sm-12 form-section-title" >
Logging
< / div >
<!-- logging - driver -->
< div class = "form-group" >
< label for = "log-driver" class = "col-sm-2 col-lg-1 control-label text-left" > Driver< / label >
< div class = "col-sm-4" >
< select class = "form-control" ng-model = "formValues.LogDriverName" id = "log-driver" >
< option selected value = "" > Default logging driver< / option >
< option ng-repeat = "driver in availableLoggingDrivers" ng-value = "driver" > {{ driver }}< / option >
< option value = "none" > none< / option >
< / select >
< / div >
< div class = "col-sm-5" >
< p class = "small text-muted" >
2020-04-10 21:54:53 +00:00
Logging driver that will override the default docker daemon driver. Select Default logging driver if you don't want to override it. Supported logging drivers
can be found < a href = "https://docs.docker.com/engine/admin/logging/overview/#supported-logging-drivers" target = "_blank" > in the Docker documentation< / a > .
2018-10-28 03:00:56 +00:00
< / p >
< / div >
< / div >
<!-- !logging - driver -->
<!-- logging - opts -->
< div class = "form-group" >
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" >
Options
2020-04-10 21:54:53 +00:00
< portainer-tooltip
position="top"
message="Add button is disabled unless a driver other than none or default is selected. Options are specific to the selected driver, refer to the driver documentation."
>< / portainer-tooltip >
2018-10-28 03:00:56 +00:00
< / label >
2020-04-10 21:54:53 +00:00
< span
class="label label-default interactive"
style="margin-left: 10px;"
ng-click="!formValues.LogDriverName || formValues.LogDriverName === 'none' || addLogDriverOpt(formValues.LogDriverName)"
>
2018-10-28 03:00:56 +00:00
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > add logging driver option
< / span >
< / div >
<!-- logging - opts - input - list -->
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
< div ng-repeat = "opt in formValues.LogDriverOpts" style = "margin-top: 2px;" >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > option< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "opt.name" placeholder = "e.g. FOO" / >
2018-10-28 03:00:56 +00:00
< / div >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > value< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "opt.value" placeholder = "e.g. bar" / >
2018-10-28 03:00:56 +00:00
< / div >
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeLogDriverOpt($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
< / div >
< / div >
<!-- logging - opts - input - list -->
< / div >
<!-- !logging - opts -->
2016-07-06 00:19:09 +00:00
< / form >
< / div >
<!-- !tab - command -->
<!-- tab - volume -->
< div class = "tab-pane" id = "volumes" >
< form class = "form-horizontal" style = "margin-top: 15px;" >
<!-- volumes -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" > Volume mapping< / label >
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addVolume()" >
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > map additional volume
2016-07-06 00:19:09 +00:00
< / span >
< / div >
<!-- volumes - input - list -->
2017-03-27 12:44:39 +00:00
< div class = "form-inline" style = "margin-top: 10px;" >
< div ng-repeat = "volume in formValues.Volumes" >
<!-- volume - line1 -->
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
<!-- container - path -->
< div class = "input-group input-group-sm col-sm-6" >
< span class = "input-group-addon" > container< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "volume.containerPath" placeholder = "e.g. /path/in/container" / >
2016-08-17 06:42:56 +00:00
< / div >
2017-03-27 12:44:39 +00:00
<!-- !container - path -->
<!-- volume - type -->
2017-09-26 03:36:51 +00:00
< div class = "input-group col-sm-5" style = "margin-left: 5px;" ng-if = "isAdmin || allowBindMounts" >
2017-03-27 12:44:39 +00:00
< div class = "btn-group btn-group-sm" >
< label class = "btn btn-primary" ng-model = "volume.type" uib-btn-radio = "'volume'" ng-click = "volume.name = ''" > Volume< / label >
< label class = "btn btn-primary" ng-model = "volume.type" uib-btn-radio = "'bind'" ng-click = "volume.name = ''" > Bind< / label >
< / div >
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeVolume($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
2016-07-06 00:19:09 +00:00
< / button >
2017-03-27 12:44:39 +00:00
< / div >
<!-- !volume - type -->
2016-07-06 00:19:09 +00:00
< / div >
2017-03-27 12:44:39 +00:00
<!-- !volume - line1 -->
<!-- volume - line2 -->
< div class = "col-sm-12 form-inline" style = "margin-top: 5px;" >
2018-03-13 05:36:53 +00:00
< i class = "fa fa-long-arrow-alt-right" aria-hidden = "true" > < / i >
2017-03-27 12:44:39 +00:00
<!-- volume -->
< div class = "input-group input-group-sm col-sm-6" ng-if = "volume.type === 'volume'" >
< span class = "input-group-addon" > volume< / span >
< select class = "form-control" ng-model = "volume.name" >
< option selected disabled hidden value = "" > Select a volume< / option >
2020-04-10 21:54:53 +00:00
< option ng-repeat = "vol in availableVolumes" ng-value = "vol.Name" > {{ vol.Name | truncate: 30 }} - {{ vol.Driver | truncate: 30 }}< / option >
2017-03-27 12:44:39 +00:00
< / select >
< / div >
<!-- !volume -->
<!-- bind -->
< div class = "input-group input-group-sm col-sm-6" ng-if = "volume.type === 'bind'" >
< span class = "input-group-addon" > host< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "volume.name" placeholder = "e.g. /path/on/host" / >
2017-03-27 12:44:39 +00:00
< / div >
<!-- !bind -->
<!-- read - only -->
< div class = "input-group input-group-sm col-sm-5" style = "margin-left: 5px;" >
< div class = "btn-group btn-group-sm" >
< label class = "btn btn-primary" ng-model = "volume.readOnly" uib-btn-radio = "false" > Writable< / label >
< label class = "btn btn-primary" ng-model = "volume.readOnly" uib-btn-radio = "true" > Read-only< / label >
< / div >
< / div >
<!-- !read - only -->
< / div >
<!-- !volume - line2 -->
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !volumes - input - list -->
< / div >
< / form >
<!-- !volumes -->
< / div >
<!-- !tab - volume -->
<!-- tab - network -->
< div class = "tab-pane" id = "network" >
< form class = "form-horizontal" style = "margin-top: 15px;" >
2017-01-22 23:14:34 +00:00
< div class = "form-group" ng-if = "globalNetworkCount === 0 && applicationState.endpoint.mode.provider !== 'DOCKER_SWARM_MODE'" >
2016-07-06 07:04:45 +00:00
< div class = "col-sm-12" >
2018-02-01 12:27:52 +00:00
< span class = "small text-muted" > You don't have any shared network. Head over the < a ui-sref = "docker.networks" > networks view< / a > to create one.< / span >
2016-07-06 07:04:45 +00:00
< / div >
< / div >
2016-07-06 00:19:09 +00:00
<!-- network - input -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_network" class = "col-sm-2 col-lg-1 control-label text-left" > Network< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-9" >
2017-11-23 15:02:40 +00:00
< select class = "form-control" ng-model = "config.HostConfig.NetworkMode" id = "container_network" ng-change = "resetNetworkConfig()" >
2016-07-06 00:19:09 +00:00
< option selected disabled hidden value = "" > Select a network< / option >
2018-10-03 23:04:38 +00:00
< option ng-repeat = "net in availableNetworks | orderBy: 'Name'" ng-value = "net.Name" > {{ net.Name }}< / option >
2016-07-06 00:19:09 +00:00
< / select >
< / div >
< / div >
<!-- !network - input -->
2016-11-16 01:52:05 +00:00
<!-- container - name - input -->
< div class = "form-group" ng-if = "config.HostConfig.NetworkMode == 'container'" >
2017-03-27 12:44:39 +00:00
< label for = "container_network_container" class = "col-sm-2 col-lg-1 control-label text-left" > Container< / label >
2016-11-16 01:52:05 +00:00
< div class = "col-sm-9" >
2018-04-04 00:31:04 +00:00
< select ng-options = "container|containername for container in runningContainers" class = "form-control" ng-model = "formValues.NetworkContainer" >
2016-11-16 01:52:05 +00:00
< option selected disabled hidden value = "" > Select a container< / option >
< / select >
< / div >
< / div >
<!-- !container - name - input -->
2016-07-06 00:19:09 +00:00
<!-- hostname - input -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_hostname" class = "col-sm-2 col-lg-1 control-label text-left" > Hostname< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.Hostname" id = "container_hostname" placeholder = "e.g. web01" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !hostname - input -->
<!-- domainname - input -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< label for = "container_domainname" class = "col-sm-2 col-lg-1 control-label text-left" > Domain Name< / label >
2016-07-06 00:19:09 +00:00
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "config.Domainname" id = "container_domainname" placeholder = "e.g. example.com" / >
2016-07-06 00:19:09 +00:00
< / div >
< / div >
<!-- !domainname -->
2018-01-06 10:53:03 +00:00
<!-- mac - address - input -->
< div class = "form-group" >
< label for = "container_macaddress" class = "col-sm-2 col-lg-1 control-label text-left" > Mac Address< / label >
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "formValues.MacAddress" id = "container_macaddress" placeholder = "e.g. 12-34-56-78-9a-bc" / >
2018-01-06 10:53:03 +00:00
< / div >
< / div >
<!-- !mac - address - input -->
2017-04-25 20:32:27 +00:00
<!-- ipv4 - input -->
< div class = "form-group" >
< label for = "container_ipv4" class = "col-sm-2 col-lg-1 control-label text-left" > IPv4 Address< / label >
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "formValues.IPv4" id = "container_ipv4" placeholder = "e.g. 172.20.0.7" / >
2017-04-25 20:32:27 +00:00
< / div >
< / div >
<!-- !ipv4 - input -->
<!-- ipv6 - input -->
< div class = "form-group" >
< label for = "container_ipv6" class = "col-sm-2 col-lg-1 control-label text-left" > IPv6 Address< / label >
< div class = "col-sm-9" >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "formValues.IPv6" id = "container_ipv6" placeholder = "e.g. a:b:c:d::1234" / >
2017-04-25 20:32:27 +00:00
< / div >
< / div >
<!-- !ipv6 - input -->
2020-01-24 14:49:28 +00:00
<!-- dns - primary - input -->
< div class = "form-group" >
< label for = "container_dns_primary" class = "col-sm-2 col-lg-1 control-label text-left" > Primary DNS Server< / label >
< div class = "col-sm-9" >
2020-04-28 00:34:54 +00:00
< input type = "text" class = "form-control" ng-model = "formValues.DnsPrimary" id = "container_dns_primary" placeholder = "e.g. 1.1.1.1, 2606:4700:4700::1111" / >
2020-01-24 14:49:28 +00:00
< / div >
< / div >
<!-- !dns - primary - input -->
<!-- dns - secondary - input -->
< div class = "form-group" >
< label for = "container_dns_secondary" class = "col-sm-2 col-lg-1 control-label text-left" > Secondary DNS Server< / label >
< div class = "col-sm-9" >
2020-04-28 00:34:54 +00:00
< input type = "text" class = "form-control" ng-model = "formValues.DnsSecondary" id = "container_dns_secondary" placeholder = "e.g. 1.0.0.1, 2606:4700:4700::1001" / >
2020-01-24 14:49:28 +00:00
< / div >
< / div >
<!-- !dns - secondary - input -->
2017-02-15 21:48:40 +00:00
<!-- extra - hosts - variables -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" > Hosts file entries< / label >
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addExtraHost()" >
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > add additional entry
2017-02-15 21:48:40 +00:00
< / span >
< / div >
<!-- extra - hosts - input - list -->
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
2017-02-15 21:48:40 +00:00
< div ng-repeat = "variable in formValues.ExtraHosts" style = "margin-top: 2px;" >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > value< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "variable.value" placeholder = "e.g. host:IP" / >
2017-02-15 21:48:40 +00:00
< / div >
2017-03-27 12:44:39 +00:00
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeExtraHost($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
2017-02-15 21:48:40 +00:00
< / div >
< / div >
<!-- !extra - hosts - input - list -->
< / div >
2017-03-12 16:24:15 +00:00
<!-- !extra - hosts - variables -->
2016-07-06 00:19:09 +00:00
< / form >
< / div >
<!-- !tab - network -->
2016-12-25 20:33:14 +00:00
<!-- tab - labels -->
< div class = "tab-pane" id = "labels" >
< form class = "form-horizontal" style = "margin-top: 15px;" >
<!-- labels -->
< div class = "form-group" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" > Labels< / label >
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addLabel()" >
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > add label
2016-12-25 20:33:14 +00:00
< / span >
< / div >
<!-- labels - input - list -->
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
2016-12-25 20:33:14 +00:00
< div ng-repeat = "label in formValues.Labels" style = "margin-top: 2px;" >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > name< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "label.name" placeholder = "e.g. com.example.foo" / >
2016-12-25 20:33:14 +00:00
< / div >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > value< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "label.value" placeholder = "e.g. bar" / >
2016-12-25 20:33:14 +00:00
< / div >
2017-03-27 12:44:39 +00:00
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeLabel($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
2016-12-25 20:33:14 +00:00
< / div >
< / div >
<!-- !labels - input - list -->
< / div >
<!-- !labels -->
< / form >
< / div >
<!-- !tab - labels -->
2017-03-27 12:44:39 +00:00
<!-- tab - env -->
< div class = "tab-pane" id = "env" >
< form class = "form-horizontal" style = "margin-top: 15px;" >
<!-- environment - variables -->
< div class = "form-group" >
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" > Environment variables< / label >
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addEnvironmentVariable()" >
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > add environment variable
< / span >
< / div >
<!-- environment - variable - input - list -->
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
< div ng-repeat = "variable in config.Env" style = "margin-top: 2px;" >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > name< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "variable.name" placeholder = "e.g. FOO" / >
2017-03-27 12:44:39 +00:00
< / div >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > value< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "variable.value" placeholder = "e.g. bar" / >
2017-03-27 12:44:39 +00:00
< / div >
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeEnvironmentVariable($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
< / div >
< / div >
<!-- !environment - variable - input - list -->
< / div >
<!-- !environment - variables -->
< / form >
< / div >
<!-- !tab - labels -->
<!-- tab - restart - policy -->
< div class = "tab-pane" id = "restart-policy" >
2016-07-06 00:19:09 +00:00
< form class = "form-horizontal" style = "margin-top: 15px;" >
< div class = "form-group" >
< div class = "col-sm-12" >
2017-03-27 12:44:39 +00:00
< label class = "control-label text-left" >
Restart policy
< / label >
< div class = "btn-group btn-group-sm" style = "margin-left: 20px;" >
< label class = "btn btn-primary" ng-model = "config.HostConfig.RestartPolicy.Name" uib-btn-radio = "'no'" >
Never
< / label >
< label class = "btn btn-primary" ng-model = "config.HostConfig.RestartPolicy.Name" uib-btn-radio = "'always'" >
Always
< / label >
< label class = "btn btn-primary" ng-model = "config.HostConfig.RestartPolicy.Name" uib-btn-radio = "'on-failure'" >
On failure
< / label >
< label class = "btn btn-primary" ng-model = "config.HostConfig.RestartPolicy.Name" uib-btn-radio = "'unless-stopped'" >
Unless stopped
2016-07-06 00:19:09 +00:00
< / label >
< / div >
< / div >
< / div >
2017-03-27 12:44:39 +00:00
< / form >
< / div >
<!-- !tab - restart - policy -->
2017-10-04 06:39:59 +00:00
<!-- tab - runtime - resources -->
< div class = "tab-pane" id = "runtime-resources" >
2017-03-27 12:44:39 +00:00
< form class = "form-horizontal" style = "margin-top: 15px;" >
2017-10-04 06:39:59 +00:00
< div class = "col-sm-12 form-section-title" >
Runtime
< / div >
2017-03-27 12:44:39 +00:00
<!-- privileged - mode -->
2017-09-27 07:26:04 +00:00
< div class = "form-group" ng-if = "isAdmin || allowPrivilegedMode" >
2017-03-27 12:44:39 +00:00
< div class = "col-sm-12" >
2017-09-27 07:26:04 +00:00
< label for = "privileged_mode" class = "control-label text-left" >
2017-03-27 12:44:39 +00:00
Privileged mode
< / label >
2020-04-10 21:54:53 +00:00
< label class = "switch" style = "margin-left: 20px;" > < input type = "checkbox" name = "privileged_mode" ng-model = "config.HostConfig.Privileged" / > < i > < / i > < / label >
2017-03-27 12:44:39 +00:00
< / div >
< / div >
2016-07-06 00:19:09 +00:00
<!-- !privileged - mode -->
2020-04-15 01:09:42 +00:00
<!-- init -->
< div class = "form-group" ng-if = "applicationState.endpoint.apiVersion >= 1.37" >
< div class = "col-sm-12" >
< label for = "init" class = "control-label text-left" >
Init
< / label >
< label class = "switch" style = "margin-left: 20px;" > < input type = "checkbox" name = "init" ng-model = "config.HostConfig.Init" / > < i > < / i > < / label >
< / div >
< / div >
<!-- !init -->
2018-08-16 09:28:06 +00:00
<!-- runtimes -->
< div class = "form-group" >
2018-10-08 20:28:26 +00:00
< label for = "container_runtime" class = "col-sm-1 control-label text-left" > Runtime< / label >
< div class = "col-sm-11" >
2020-04-10 21:54:53 +00:00
< select class = "form-control" ng-model = "config.HostConfig.Runtime" id = "container_runtime" ng-options = "runtime for runtime in availableRuntimes" >
2018-10-08 20:28:26 +00:00
< option selected value = "" > Default< / option >
2018-08-16 09:28:06 +00:00
< / select >
< / div >
< / div >
<!-- !runtimes -->
2016-07-06 00:19:09 +00:00
< / form >
2017-04-16 07:57:47 +00:00
< form class = "form-horizontal" style = "margin-top: 15px;" >
<!-- devices -->
< div class = "form-group" >
< div class = "col-sm-12" style = "margin-top: 5px;" >
< label class = "control-label text-left" > Devices< / label >
< span class = "label label-default interactive" style = "margin-left: 10px;" ng-click = "addDevice()" >
< i class = "fa fa-plus-circle" aria-hidden = "true" > < / i > add device
< / span >
< / div >
2020-04-10 21:54:53 +00:00
<!-- devices - input - list -->
2017-04-16 07:57:47 +00:00
< div class = "col-sm-12 form-inline" style = "margin-top: 10px;" >
< div ng-repeat = "device in config.HostConfig.Devices" style = "margin-top: 2px;" >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > host< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "device.pathOnHost" placeholder = "e.g. /dev/tty0" / >
2017-04-16 07:57:47 +00:00
< / div >
< div class = "input-group col-sm-5 input-group-sm" >
< span class = "input-group-addon" > container< / span >
2020-04-10 21:54:53 +00:00
< input type = "text" class = "form-control" ng-model = "device.pathInContainer" placeholder = "e.g. /dev/tty0" / >
2017-04-16 07:57:47 +00:00
< / div >
< button class = "btn btn-sm btn-danger" type = "button" ng-click = "removeDevice($index)" >
< i class = "fa fa-trash" aria-hidden = "true" > < / i >
< / button >
< / div >
< / div >
<!-- !devices - input - list -->
< / div >
<!-- !devices -->
2017-10-04 06:39:59 +00:00
< div class = "col-sm-12 form-section-title" >
Resources
< / div >
<!-- memory - reservation - input -->
< div class = "form-group" >
< label for = "memory-reservation" class = "col-sm-3 col-lg-2 control-label text-left" style = "margin-top: 20px;" >
Memory reservation
< / label >
< div class = "col-sm-3" >
2017-12-06 11:04:02 +00:00
< slider model = "formValues.MemoryReservation" floor = "0" ceil = "state.sliderMaxMemory" step = "256" ng-if = "state.sliderMaxMemory" > < / slider >
2017-10-04 06:39:59 +00:00
< / div >
< div class = "col-sm-2" >
2020-04-10 21:54:53 +00:00
< input type = "number" min = "0" class = "form-control" ng-model = "formValues.MemoryReservation" id = "memory-reservation" / >
2017-10-04 06:39:59 +00:00
< / div >
< div class = "col-sm-4" >
< p class = "small text-muted" style = "margin-top: 7px;" >
Memory soft limit (< b > MB< / b > )
< / p >
< / div >
< / div >
<!-- !memory - reservation - input -->
<!-- memory - limit - input -->
< div class = "form-group" >
< label for = "memory-limit" class = "col-sm-3 col-lg-2 control-label text-left" style = "margin-top: 20px;" >
Memory limit
< / label >
< div class = "col-sm-3" >
2017-12-06 11:04:02 +00:00
< slider model = "formValues.MemoryLimit" floor = "0" ceil = "state.sliderMaxMemory" step = "256" ng-if = "state.sliderMaxMemory" > < / slider >
2017-10-04 06:39:59 +00:00
< / div >
< div class = "col-sm-2" >
2020-04-10 21:54:53 +00:00
< input type = "number" min = "0" class = "form-control" ng-model = "formValues.MemoryLimit" id = "memory-limit" / >
2017-10-04 06:39:59 +00:00
< / div >
< div class = "col-sm-4" >
< p class = "small text-muted" style = "margin-top: 7px;" >
Memory limit (< b > MB< / b > )
< / p >
< / div >
< / div >
<!-- !memory - limit - input -->
<!-- cpu - limit - input -->
< div class = "form-group" >
< label for = "cpu-limit" class = "col-sm-3 col-lg-2 control-label text-left" style = "margin-top: 20px;" >
CPU limit
< / label >
< div class = "col-sm-5" >
2017-12-06 11:04:02 +00:00
< slider model = "formValues.CpuLimit" floor = "0" ceil = "state.sliderMaxCpu" step = "0.25" precision = "2" ng-if = "state.sliderMaxCpu" > < / slider >
2017-10-04 06:39:59 +00:00
< / div >
< div class = "col-sm-4" style = "margin-top: 20px;" >
< p class = "small text-muted" >
Maximum CPU usage
< / p >
< / div >
< / div >
<!-- !cpu - limit - input -->
2017-04-16 07:57:47 +00:00
< / form >
2016-07-06 00:19:09 +00:00
< / div >
2017-10-04 06:39:59 +00:00
<!-- !tab - runtime - resources -->
2018-08-09 08:40:06 +00:00
<!-- tab - container - capabilities -->
< div class = "tab-pane" id = "container-capabilities" >
2020-04-10 21:54:53 +00:00
< container-capabilities capabilities = "formValues.capabilities" > < / container-capabilities >
2018-08-09 08:40:06 +00:00
< / div >
<!-- !tab - container - capabilities -->
2016-07-06 00:19:09 +00:00
< / div >
< / rd-widget-body >
< / rd-widget >
< / div >
< / div >