async function installUpgrade() {
  // if the system is not running docker, exit
  if (!this.dockerode) {
    throw new PlatformNotCompatible('SYSTEM_NOT_RUNNING_DOCKER');
  }

  const watchtowerImage = 'containrrr/watchtower:latest';

  logger.info(`Pulling ${watchtowerImage} image...`);
  await this.pull(watchtowerImage);

  // Create and start Watchtower container
  const container = await this.dockerode.createContainer({
    Image: watchtowerImage,
    name: `gladys-watchtower-${Date.now()}`,
    HostConfig: {
      AutoRemove: true,
      Binds: ['/var/run/docker.sock:/var/run/docker.sock'],
    },
    Cmd: ['--run-once', '--cleanup', '--include-restarting'],
  });

  // Start the container
  await container.start();
  logger.info('Watchtower container started');

  // Stream container logs
  const logStream = await container.logs({
    follow: true,
    stdout: true,
    stderr: true,
    timestamps: false,
  });

  // Handle log stream
  logStream.on('data', (chunk) => {
    if (chunk) {
      const logMessage = chunk.toString().trim();
      logger.debug('Watchtower log:', logMessage);

      // Split the message into lines and process each line
      const lines = logMessage.split('\n');
      lines.forEach((line) => {
        if (line.trim()) {
          const parsedMessage = parseWatchtowerLog(line);
          if (parsedMessage) {
            this.event.emit(EVENTS.WEBSOCKET.SEND_ALL, {
              type: WEBSOCKET_MESSAGE_TYPES.SYSTEM.WATCHTOWER_LOG,
              payload: { message: parsedMessage },
            });
          }
        }
      });
    }
  });

  // Wait for container to finish
  const { StatusCode } = await container.wait();
  logger.info(`Watchtower container finished with status code ${StatusCode}`);
}
@description Install new upgrade.
@example
await installUpgrade();