简体   繁体   中英

Docker commands to run in script from Command Line

I need help with following commands to put in script at CMD. I have all setup for docker.

1) Runs at CMD:

docker run --net=host --interactive --tty auvsisuas/interop-client

2) Runs at # on CMD screen

./tools/interop_cli.py --url http://10.10.130.2:8000 --username testuser missions

Reference : https://github.com/auvsi-suas/interop/wiki/Getting-Started#create-container--start-shell and https://github.com/auvsi-suas/interop/wiki/Getting-Started#get-missions

If I run individual commands in CMD one after another it works and gives me output. But when I put in script (.bat) file, it only runs 1st command after which # prompt appears on screen but 2nd command does not execute.

What I need:

Script to run Both commands together from CMD

Note: The image is publicly available and can be tried on any docker setup.

What I want:(This is what happens when I type directly in CMD)

My .CMD/BAT file

What happens: - stops at the # prompt

Any help is much appreciated.

如果您要从另一个脚本中调用.bat等,请不要忘记默认行为是将控制权转移到较低级别的脚本,并且永不返回-如果您想让控件返回到.bat等,则需要使用“ call”执行较低一级脚本后​​的顶级脚本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM