INNER CODE UNIT · Go

exitInvalidWatchtowerRestart

nicholas-fedor/watchtower · cmd/root.go:334

func exitInvalidWatchtowerRestart(
	log *zerolog.Logger,
	dockerClient container.Client,
	watchtowerContainer types.Container,
) {
	log.Info().
		Msg("Detected invalid restart of old Watchtower container, stopping Watchtower container now")

	exitCtx, exitCancel := context.WithTimeout(
		context.Background(),
		containerLookupTimeout,
	)

	// Attempt to recover an orphaned Watchtower container that is stuck
	// in the created state before exiting. If recovery succeeds, the
	// old container still exits with restart policy set to "no".
	recoverCtx, recoverCancel := context.WithTimeout(
		context.Background(),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…