Skip to content

use local docker.sock needs to clean tmp docker images  #2444

Closed
@richard28530

Description

@richard28530

https://github.com/Azure/sonic-buildimage/blob/178764e3fa2fdd08f8b7b05c33e2e1539b09dfe2/Makefile.work#L83

docker image ls
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
docker-orchagent-nephos      latest              836e854dbd19        15 hours ago        285MB
                                     336d9bd9334f        15 hours ago        312MB
docker-fpm-quagga            latest              bd18fac92250        15 hours ago        281MB
                                     56aa7bd3a515        15 hours ago        312MB
docker-teamd                 latest              33e6379d0511        15 hours ago        274MB
                                     a58623a6edfa        15 hours ago        300MB
docker-syncd-nephos          latest              b475b030a3d9        15 hours ago        303MB
                                     c71ad38e8bac        15 hours ago        331MB
docker-snmp-sv2              latest              7d45e5692868        15 hours ago        296MB
                                     f5727cfe9827        15 hours ago        450MB
docker-lldp-sv2              latest              7457cabd59d4        15 hours ago        274MB
                                     161bcb65c38a        15 hours ago        314MB
docker-platform-monitor      latest              0b9ad53d53f8        15 hours ago        287MB
                                     9a7fd32bb425        15 hours ago        323MB
docker-database              latest              9554c38ba871        15 hours ago        255MB
                                     1bb9de7fd773        15 hours ago        278MB
docker-dhcp-relay            latest              5b297c0cb375        15 hours ago        257MB
                                     60b57d1035b3        15 hours ago        279MB
docker-router-advertiser     latest              5b00a0dfdfd4        15 hours ago        253MB
                                     485327b981b4        15 hours ago        275MB
docker-config-engine         latest              85e1338a6ae3        15 hours ago        252MB
                                     171d8ccb137c        15 hours ago        310MB
docker-base                  latest              514e931b6336        15 hours ago        203MB
                                     ec3571a250cf        15 hours ago        226MB

after building the tmp docker images will exist on the compiler machine, which will consume much disk space.

suggest to remove it

	$(eval DANGLING_DOCKERS := $(shell docker images -f 'dangling=true' -q))
	$(eval TMP_DOCKERS := $(shell docker images 'docker*' -q))
	-@docker rmi -f $(DANGLING_DOCKERS) &> /dev/null | true
	-@docker rmi -f $(TMP_DOCKERS) &> /dev/null | true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions