-
Notifications
You must be signed in to change notification settings - Fork 4
/
Docker commands.txt
37 lines (26 loc) · 1.22 KB
/
Docker commands.txt
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
*) Create a container:
docker run -d -p [machine_port:docker:port] --net [network name] --name [image custom name] [image name]
*) Create a ngrok container:
First of all, you need to create a container with the same network ngrok will use to expose web app
docker run -d -p 4040:4040 --net [network name] --name ngrok wernight/ngrok ngrok http [container to expose name]:[container to expose port]
*) Create a ngrok container if you want to ser your ngrok's account:
docker run -d -p 4040:4040 --net ngrok_animego_api -e NGROK_USERNAME="C9-LinkRs" -e NGROK_PASSWORD="30zeldafan1998" -e NGROK_AUTH="1Uq8449mdiGUyQmgzBbg40GPUZO_7etoycRoQSfgQv6JFRhPx" --name ngrok wernight/ngrok ngrok http animego_api:5000
*) Check ngrok tunnels:
curl $(docker port ngrok 4040)/api/tunnels
*) Set ngrok auth token:
sudo docker exec -it [ngrok container id] ngrok authtoken [token]
*) Get lastest ngrok image:
docker pull wernight/ngrok:latest
*) Build an image with custom named Dockerfile:
docker build -f [Dockerfile name]
*) Check Docker info:
docker info
*) Check images:
docker images
*) Check containers:
-) running: docker ps
-) stopped: docker ps -a
*) Create a network:
docker network create [network name]
*) Docker compose:
docker-compose up -d