1. Query the IP address of a Dockers container.
[[email protected] ~]# Docker inspect--format='{{. Networksettings.ipaddress}}' 3ea2b8c52e72172.17. 0.7
Query Container MAC Address
[[email protected] ~]# Docker inspect--format='{{. Networksettings.macaddress}}' 3ea2b8c52e72: All: AC: xx:
Query the landing environment
[[email protected] ~]# Docker inspect--format='{{. LogPath}}' 3ea2b8c52e72/var/lib/docker/containers/ 3ea2b8c52e727bb6ea39e4e23e4126dd521beae8d1007876c1bb75dbb4c1442d/ 3ea2b8c52e727bb6ea39e4e23e4126dd521beae8d1007876c1bb75dbb4c1442d-json.log
View Port Mappings
[[email protected] ~]# Docker inspect--format='{{(index. Networksettings.ports "5000/UDP") 0). Hostport}}' 92d9e2414ca7
View the records that the container has run on (test is the name of the container)
[[Email protected] ~]# docker logs Test[email protected]:/# ^c[email protected]:exit
Modify the name of the container (rename), rename the new name of the existing name
[email protected] ~]# Docker rename Testren testred
Bulk Delete stopped containers
RM PS ' exited=0 ' awk ' {print $} ' sed ' /^con/d ' ) 5e5281bcd54da6f67afde310186d7a3724fe
Docker Learning Notes