code: def __setup_native_run(self):
          self.vol_opts = ['z']
          self.add_env('SCUBAINIT_UMASK', '{:04o}'.format(get_umask()))
          if not self.as_root:
              self.add_env('SCUBAINIT_UID', os.getuid())
              self.add_env('SCUBAINIT_GID', os.getgid())
          if self.verbose:
              self.add_env('SCUBAINIT_VERBOSE', 1)
          scubainit_cpath = self.copy_scubadir_file('scubainit', self.scubainit_path)
          for name in ('root', 'user', ):
              self.__generate_hook_script(name)
          if sys.stdout.isatty() and sys.stdin.isatty():
              self.add_option('--tty')
          try:
              context = self.config.process_command(self.user_command)
          except ConfigError as cfgerr:
              raise ScubaError(str(cfgerr))
          if self.image_override:
              context.image = self.image_override
          '''
          Normally, if the user provides no command to "docker run", the image's
          default CMD is run. Because we set the entrypiont, scuba must emulate the
          default behavior itself.
          '''
          if not context.script:
              verbose_msg('No user command; getting command from image')
              default_cmd = get_image_command(context.image)
              if not default_cmd:
                  raise ScubaError('No command given and no image-specified command')
              verbose_msg('{} Cmd: "{}"'.format(context.image, default_cmd))
              context.script = [shell_quote_cmd(default_cmd)]
          self.add_option('--entrypoint={}'.format(scubainit_cpath))
          self.docker_cmd = []
          if self.entrypoint_override is not None:
              if self.entrypoint_override != '':
                  self.docker_cmd = [self.entrypoint_override]
          elif context.entrypoint is not None:
              if context.entrypoint != '':
                  self.docker_cmd = [context.entrypoint]
          else:
              ep = get_image_entrypoint(context.image)
              if ep:
                  self.docker_cmd = ep
          with self.open_scubadir_file('command.sh', 'wt') as f:
              self.docker_cmd += ['/bin/sh', f.container_path]
              writeln(f, '
              writeln(f, '
              writeln(f, 'set -e')
              for cmd in context.script:
                  writeln(f, cmd)
          self.context = context