Is production: true
#migrated

Docker daily operation command

Created: 19 Mar 2023 Modified: 19 Mar 2023 Lang: English



[Legacy Link]

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#List all docker container runing 
docker container ls

#get into the shell environment
docker exec -it {container} /bin/bash

#get into the shell environment with specific user
docker exec -it --user {user} {container} /bin/bash

#copy files
#if add {container}: as prefix, the path should be pointing to path
docker cp {container}:{path} {destination_path}

#check docker cpu,memory and io usage 
docker stats
``