procTagImage
    :: (Member Proc r,
       Member (Exception DockerEx) r)
    => Image
    -> Tag
    -> Eff r Image
procTagImage img@(Image name _tag) tag' = do
    (status, _stdout, stderr) <- docker "tag" [imageRepr img, name <> ":" <> tagRepr tag']
    when (isFailure status) $
        -- TODO Parse the error and throw correct exception
        when (isFailure status) $ throwException (parseError stderr)
    return (Image name tag')
procTagImage
    :: (Member Proc r,
       Member (Exception DockerEx) r)
    => Image
    -> Tag
    -> Eff r Image
procTagImage img@(Image name _tag) tag' = do
    (status, _stdout, stderr) <- docker "tag" [imageRepr img, name <> ":" <> tagRepr tag']
    when (isFailure status) $
        -- TODO Parse the error and throw correct exception
        when (isFailure status) $ throwException (parseError stderr)
    return (Image name tag')
procTagImage img@(Image name _tag) tag' = do
    (status, _stdout, stderr) <- docker "tag" [imageRepr img, name <> ":" <> tagRepr tag']
    when (isFailure status) $
        -- TODO Parse the error and throw correct exception
        when (isFailure status) $ throwException (parseError stderr)
    return (Image name tag')