In the milletopen-falcon
One of the parts is fromdocker
I got it back.
Following the tutorial, docker’s:
# make the imageļ¼run commands under dir of dashboard:
docker build -t falcon-dashboard:v1.0 .
# start the container
docker run -itd --name aaa --net host \
-e API_ADDR=http://127.0.0.1:8080/api/v1 \
-e PORTAL_DB_HOST=127.0.0.1 \
-e PORTAL_DB_PORT=3306 \
-e PORTAL_DB_USER=root \
-e PORTAL_DB_PASS=123456 \
-e PORTAL_DB_NAME=falcon_portal \
-e ALARM_DB_PASS=123456 \
-e ALARM_DB_HOST=127.0.0.1 \
-e ALARM_DB_PORT=3306 \
-e ALARM_DB_USER=root \
-e ALARM_DB_PASS=123456 \
-e ALARM_DB_NAME=alarms \
falcon-dashboard:v1.0
From the above command, I don’t see what -p is used to bind the port mapping, but somehow, I can still request the port of an item in the container docker.
This is strange.
--net
Option has been set for docker’s network, seenetwork settings
Network can customize the network and docker connected to the same network can communicate with each other.