Pull, Tag, Save, Delete Multiple Docker Containers
Global variables

These:

cli = docker.APIClient(base_url="unix://var/run/docker.sock")
current_dir = os.getcwd()
repository = sys.argv[2]
tar_dir = os.path.join(current_dir, "move")


probably shouldn't live in the global namespace. Move them to a function, and feed them into other functions or class instances via arguments.

Command-line arguments

Use the built-in argparse library, if not something fancier like Click, rather than direct use of sys.argv. It will allow nicer help generation, etc.

Boolean comparison

if path.exists(tar_dir) is not True:


should just be

if not path.exists(tar_dir):


Pathlib

Use it; it's nice! For instance, if tar_dir is an instance of Path, then you can replace the above with if not tar_dir.exists().

It should also be preferred over manual path concatenation like f"{repository}/{img}"; i.e.

Path(repository) / img


there are other instances that should also use pathlib; for instance rather than manually appending .tar, use with_suffix.

Split unpack

img_t = image.split(":")
img = img_t[0].strip()
t = img_t[1].strip()
image = f"{img}:{t}"


can be

image, t = image.split(':')
image_filename = f'{image.strip()}:{t.strip()}'