a method to run a system command in a separate shell

        :param sys_command: string with docker command
        :return: string output from docker

def command(self, sys_command):

        '''
            a method to run a system command in a separate shell

        :param sys_command: string with docker command
        :return: string output from docker
        '''

        title = '%s.command' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'sys_command': sys_command
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

        from subprocess import check_output, STDOUT, CalledProcessError
        try:
            output = check_output(sys_command, shell=True, stderr=STDOUT).decode('utf-8')
        except CalledProcessError as err:
            raise Exception(err.output.decode('ascii', 'ignore'))

        return output