Docker - History

> Virtualization - (Virtual Machine|Container) > Docker

1 - About

The history command permits you to see the commit history of your image

3 - Example

The RUN command in a dockerfile creates automatically a commit

# install wget - First commit
RUN  apt-get update && apt-get install -qq -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/*
 
# remove wget - Second commit
RUN apt-get purge -y --auto-remove wget
docker history your_image
...
41753cb4a6be        4 hours ago         /bin/sh -c apt-get purge -y --auto-remove ...   445 kB              
1eae68198132        17 hours ago        /bin/sh -c apt-get update && apt-get insta...   34.4 MB
...
Advertising