code: func entrypoint(b *Builder, args []string, attributes map[string]bool, flagArgs []string, original string) error {
  	parsed := handleJSONArgs(args, attributes)
  
  	switch {
  	case attributes["json"]:
  		// ENTRYPOINT ["echo", "hi"]
  		b.RunConfig.Entrypoint = strslice.StrSlice(parsed)
  	case len(parsed) == 0:
  		// ENTRYPOINT []
  		b.RunConfig.Entrypoint = nil
  	default:
  		// ENTRYPOINT echo hi
  		if runtime.GOOS != "windows" {
  			b.RunConfig.Entrypoint = strslice.StrSlice{"/bin/sh", "-c", parsed[0]}
  		} else {
  			b.RunConfig.Entrypoint = strslice.StrSlice{"cmd", "/S", "/C", parsed[0]}
  		}
  	}
  
  	// when setting the entrypoint if a CMD was not explicitly set then
  	// set the command to nil
  	if !b.CmdSet {
  		b.RunConfig.Cmd = nil
  	}
  	return nil
  }
docs: // ENTRYPOINT /usr/sbin/nginx
  //
  // Set the entrypoint (which defaults to sh -c on linux, or cmd /S /C on Windows) to
  // /usr/sbin/nginx. Will accept the CMD as the arguments to /usr/sbin/nginx.
  //
  // Handles command processing similar to CMD and RUN, only b.RunConfig.Entrypoint
  // is initialized at NewBuilder time instead of through argument parsing.
  //