hunk.code_window:       runSsl: {
           command: [
             'docker stop portainer',
             'docker rm portainer',
             'docker run -d -p 9000:9000 -v /tmp/portainer:/data -v /tmp/docker-ssl:/certs --name portainer portainer -H tcp://10.0.7.10:2376 --tlsverify'
           ].join(';')
         },
         cleanImages: {
           command: 'docker rmi $(docker images -q -f dangling=true)'
         }
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:           'docker run -d -p 9000:9000 -v /tmp/portainer:/data -v /tmp/docker-ssl:/certs --name portainer portainer -H tcp://10.0.7.10:2376 --tlsverify --no-analytics'
  
hunk.file_path: gruntfile.js
hunk.type: replace
file: angular.module('portainer.services')
  .factory('VolumeService', ['$q', 'Volume', function VolumeServiceFactory($q, Volume) {
    'use strict';
    var service = {};
  
    service.getVolumes = function() {
      return Volume.query({}).$promise;
    };
  
    function prepareVolumeQueries(template, containerConfig) {
      var volumeQueries = [];
      if (template.volumes) {
        template.volumes.forEach(function (vol) {
          volumeQueries.push(
            Volume.create({}, function (d) {
              if (d.message) {
                Messages.error("Unable to create volume", {}, d.message);
              } else {
                Messages.send("Volume created", d.Name);
                containerConfig.Volumes[vol] = {};
                containerConfig.HostConfig.Binds.push(d.Name + ':' + vol);
              }
            }, function (e) {
              Messages.error("Failure", e, "Unable to create volume");
            }).$promise
          );
        });
      }
      return volumeQueries;
    }
  
    service.createVolume = function(volumeConfiguration) {
      var deferred = $q.defer();
      Volume.create(volumeConfiguration).$promise
      .then(function success(data) {
        if (data.message) {
          deferred.reject({ msg: data.message });
        } else {
          deferred.resolve(data);
        }
      })
      .catch(function error(err) {
        deferred.reject({ msg: 'Unable to create volume', err: err });
      });
      return deferred.promise;
    };
  
    service.createVolumes = function(volumes) {
      var createVolumeQueries = volumes.map(function(volume) {
        return service.createVolume(volume);
      });
      return $q.all(createVolumeQueries);
    };
  
    service.createXAutoGeneratedLocalVolumes = function (x) {
      var createVolumeQueries = [];
      for (var i = 0; i < x; i++) {
        createVolumeQueries.push(service.createVolume({}));
      }
      return $q.all(createVolumeQueries);
    };
  
    return service;
  }]);
  