docker
2020-07-07 本文已影响0人
田涛347
工作笔记
查看docker容器列表`
sudo docker ps -a
进入容器文件目录
sudo docker exec -it [tb-gateway](http://tb-gateway/etc/thingsboard-gateway/tb_gateway.yaml) ``/bin/bash`
docker exec -it /bin/bash
或者
docker exec -it /bin/sh
从容器拷贝文件到出来
`sudo docker cp [tb-gateway:/etc/thingsboard-gateway/config/tb_gateway.yaml](http://tb-gateway/etc/thingsboard-gateway/tb_gateway.yaml) /flh/data`
拷贝文件到容器
sudo docker cp /flh/data/tb_gateway.yaml tb-gateway:/etc/thingsboard-gateway/config/tb_gateway.yaml
(http://tb-gateway/etc/thingsboard-gateway/config/tb_gateway.yaml)
sudo docker cp /flh/data/mqtt.json tb-gateway:/etc/thingsboard-gateway/config/mqtt.json
(http://tb-gateway/etc/thingsboard-gateway/config/mqtt.json)