-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker.txt
More file actions
82 lines (46 loc) · 1.39 KB
/
docker.txt
File metadata and controls
82 lines (46 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
DOCKER
Process:
docker-compose build
docker-compose up -d
sudo docker ps -aqf name="containername"
Go inside a running container
docker exec -it cdfe9ee30105 bash
Dont run this below command
sudo docker attach 9a4dcdd2c244
List all container IDs:
docker ps -aq
Stop all running containers:
docker stop $(docker ps -aq)
Remove all containers
docker rm $(docker ps -aq)
List all exited containers
docker ps -aq -f status=exited
Remove dangling/untagged images
docker images -q --filter dangling=true | xargs docker rmi
Remove containers created after a specific container
docker ps --since a1bz3768ez7g -q | xargs docker rm
Remove container by image name:
docker rm (docker ps -a |grep [IMAGE_NAME] |awk '{print $1}')
Remove all containers forcefully
docker rm -f $(docker ps -a -q)
Migrate script:
php artisan migrate --path=/database/migrations/2018_10_15_000000_create_errors_table
Start container:
docker container start 354faad3299f354faad3299f
Force recreate creation of microservice
docker-compose up --force-recreate
docker-compose up --build --force-recreate
STEPS:
docker-compose build
docker-compose up -d
docker container start 354faad3299f354faad3299f
cnc
Current version:
Docker version 18.06.1-ce, build e68fc7a
Ping to see if the CNC is working:
curl http://cnc:5000/api/ping
Wine:
sudo apt update
sudo apt install wine-stable
Pass port id to kill it:
lsof -i:8080 -t