|
|
@@ -196,6 +196,15 @@ func StartContainer(containerName string, containerType string) (structs.Contain
|
|
|
msg := fmt.Sprintf("Started stopped container %s", containerName)
|
|
|
logger.Info(msg)
|
|
|
default:
|
|
|
+ // debug
|
|
|
+ currentImage := existingContainer.Image
|
|
|
+ tagAndDigest := strings.Split(currentImage, ":")[1] // This will give "latest@sha256"
|
|
|
+ currentTag := strings.Split(tagAndDigest, "@")[0] // This will give "latest"
|
|
|
+
|
|
|
+ logger.Info(fmt.Sprintf("Current image: %s, Current tag: %s, Desired tag: %s, Current ID: %s, Desired ID: %s",
|
|
|
+ currentImage, currentTag, desiredTag, existingContainer.ImageID, desiredHash))
|
|
|
+
|
|
|
+ //
|
|
|
// if container is running, check the image hash
|
|
|
if existingContainer.ImageID != desiredHash {
|
|
|
// if the hashes don't match, recreate the container with the new one
|