【发布时间】:2019-03-04 19:51:43
【问题描述】:
编写文件:
version: '3'
networks:
frontend:
driver: bridge
services:
### Workspace Utilities ##################################
workspace:
build:
context: ./workspace
volumes:
- './app/:/home/app'
networks:
- frontend
### NMAP ###############################################
nmap:
build:
context: ./nmap
networks:
- frontend
links:
- workspace
在我的第一个容器中,我在第二个容器 Nmap 中有一个 Nodejs 和 PM2 中的应用程序。 在我的应用程序中,现在我只调用:
exec('nmap -A 192.168.1.1/24 oX test.xml', (error, stdout, stderr) => {
.....
});
如何使用我的第一个容器中的第二个容器中的 nmap?
【问题讨论】: