Install docker python module: pip3 install docker

#dockerDive.py
import docker
cli = docker.APIClient(base_url='unix://var/run/docker.sock')
print (cli.history('179da7ea6c0c'))
python3 dockerDive.py
[{'Comment': '', 'Created': 1654890249, 'CreatedBy': '/bin/sh -c #(nop) ENTRYPOINT ["perl" "/opt/src_code/prepareVIRs.pl"]', 'Id': 'sha256:179da7ea6c0c4771c9b0ebb60d15a8e82172a7b44bce66b082d7e3d54a2f4e12', 'Size': 0, 'Tags': ['earnhardt/vir_report:version1.0']}, {'Comment': '', 'Created': 1654890249, 'CreatedBy': '/bin/sh -c #(nop) COPY file:a3a0e3eee12601499dd7d3fd25284f9f8a6798e72efb2edd826131acca0bdd34 in /opt/src_code/prepareVIRs.pl ', 'Id': '', 'Size': 25587, 'Tags': None}, {'Comment': '', 'Created': 1654624109, 'CreatedBy': '/bin/sh -c #(nop) COPY dir:928b5768cbba5b34ad2497461951681645f0f75521a14b09dc5f7c0b2db06207 in /usr/local ', 'Id': '', 'Size': 256547, 'Tags': None}, {'Comment': '', 'Created': 1654624109, 'CreatedBy': '/bin/sh -c cpanm Data::Dumper', 'Id': '', 'Size': 1779730, 'Tags': None}, {'Comment': '', 'Created': 1654624101, 'CreatedBy': '/bin/sh -c #(nop) CMD ["/bin/sh" "-c" "/bin/bash"]', 'Id': '', 'Size': 0, 'Tags': None}, {'Comment': '', 'Created': 1654624101, 'CreatedBy': '/bin/sh -c apt-get update && apt-get install -y curl', 'Id': '', 'Size': 494056, 'Tags': None}, {'Comment': '', 'Created': 1654624094, 'CreatedBy': '/bin/sh -c apt-get update && apt-get install -yq build-essential cpanminus iputils-ping apt-utils', 'Id': '', 'Size': 167062336, 'Tags': None}, {'Comment': '', 'Created': 1654624065, 'CreatedBy': '/bin/sh -c #(nop) WORKDIR /opt', 'Id': '', 'Size': 0, 'Tags': None}, {'Comment': '', 'Created': 1654624064, 'CreatedBy': '/bin/sh -c apt-get update && apt-get upgrade -y perl curl', 'Id': '', 'Size': 95291787, 'Tags': None}, {'Comment': '', 'Created': 1654612654, 'CreatedBy': '/bin/sh -c #(nop) LABEL maintainer=Frank Earnhardt frank.earnhardt@outlook.com', 'Id': '', 'Size': 0, 'Tags': None}, {'Comment': '', 'Created': 1654554065, 'CreatedBy': '/bin/sh -c #(nop) CMD ["bash"]', 'Id': '', 'Size': 0, 'Tags': None}, {'Comment': '', 'Created': 1654554064, 'CreatedBy': '/bin/sh -c #(nop) ADD file:40290d9a94ae76c35ab1f57178130ce1c5b976e34a91e77472ecf7e945ab64f9 in / ', 'Id': '', 'Size': 63149579, 'Tags': None}]