You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm confused about the container size.
After adding some new empty files, I show the container size, it's 25B. Then I delete the file, and the container size becomes 50B.
Step 1:
~# ls -lt "/var/lib/docker/overlay2/60ec18d730cfb706433358bcd949caad9dad0ce360724f507107a84159538edf/diff"
total 4
-rw-r--r-- 1 root root 0 Apr 25 03:25 test
-rw-r--r-- 1 root root 0 Apr 25 03:25 hello
drwx------ 2 root root 4096 Apr 24 07:20 root
root@weiubuntu:~# docker ps -s
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
6ce521e7b372 busybox "sleep 100000" 22 hours ago Up 2 hours adoring_dubinsky 25B (virtual 4.86MB)
Step 2:
root@weiubuntu:~# docker exec -it 6ce521e7b372 sh
/ # ls
bin dev etc hello home lib lib64 proc root sys test tmp usr var
/ # rm hello
/ # rm test
/ # exit
root@weiubuntu:~# docker ps -s
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
6ce521e7b372 busybox "sleep 100000" 22 hours ago Up 2 hours adoring_dubinsky 50B (virtual 4.86MB)
root@weiubuntu:~# ls -lt "/var/lib/docker/overlay2/60ec18d730cfb706433358bcd949caad9dad0ce360724f507107a84159538edf/diff"
total 4
drwx------ 2 root root 4096 Apr 24 07:20 root
Env info:
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 17:10:06 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 15:57:50 2022
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.5.9-0ubuntu3.1
GitCommit:
runc:
Version: 1.1.0-0ubuntu1.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm confused about the container size.
After adding some new empty files, I show the container size, it's 25B. Then I delete the file, and the container size becomes 50B.
Step 1:
Step 2:
Env info:
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 17:10:06 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.17.3
Git commit: 20.10.12-0ubuntu4
Built: Mon Mar 7 15:57:50 2022
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.5.9-0ubuntu3.1
GitCommit:
runc:
Version: 1.1.0-0ubuntu1.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
Beta Was this translation helpful? Give feedback.
All reactions