我有两个docker容器正在运行,比如
khine@zapotec ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4d60202f8da1 mongo:3.2 "docker-entrypoint.sh" 3 months ago Up 3 months 27017/tcp mongo-web
52a8569562c8 mongo:2.4 "/entrypoint.sh mongo" 15 months ago Up 14 months 27017/tcp mongo-dev mongo-dev
我可以使用以下内容导出用户:
docker exec -i mongo-dev sh -c "mongoexport -d ccc-mongo -c users -q '{\"group\" : \"guest\"}'" > guest_users.js
但我如何将其传输到mongo-web容器中?
docker exec -i mongo-web sh -c "mongoimport -d ccc-mongo -c users --file" < guest_users.js
非常感谢任何建议