mirror of https://github.com/portainer/portainer
feat(container-creation): support auto remove option (docker run --rm) (#2684)
parent
d5dfc889bb
commit
99e50370bd
|
@ -50,6 +50,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
|
||||||
PortBindings: [],
|
PortBindings: [],
|
||||||
PublishAllPorts: false,
|
PublishAllPorts: false,
|
||||||
Binds: [],
|
Binds: [],
|
||||||
|
AutoRemove: false,
|
||||||
NetworkMode: 'bridge',
|
NetworkMode: 'bridge',
|
||||||
Privileged: false,
|
Privileged: false,
|
||||||
Runtime: '',
|
Runtime: '',
|
||||||
|
|
|
@ -125,6 +125,17 @@
|
||||||
Actions
|
Actions
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<!-- autoremove -->
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<label for="ownership" class="control-label text-left">
|
||||||
|
Auto remove
|
||||||
|
<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>
|
||||||
|
</label>
|
||||||
|
<label class="switch" style="margin-left: 20px;">
|
||||||
|
<input type="checkbox" ng-model="config.HostConfig.AutoRemove"><i></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<!-- !autoremove -->
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !config.Image || (!formValues.Registry && fromContainer)" ng-click="create()" button-spinner="state.actionInProgress">
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !config.Image || (!formValues.Registry && fromContainer)" ng-click="create()" button-spinner="state.actionInProgress">
|
||||||
<span ng-hide="state.actionInProgress">Deploy the container</span>
|
<span ng-hide="state.actionInProgress">Deploy the container</span>
|
||||||
|
|
Loading…
Reference in New Issue