1 Star 0 Fork 0

stone-ch/minifabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
minifabwin 944 Bytes
一键复制 编辑 原始数据 按行查看 历史
Tong Li 提交于 2020-08-14 18:58 . Fixed the windows WSL issue
@echo off
setlocal
setlocal enabledelayedexpansion
SET _alladdress=
for /f "usebackq tokens=2 delims=:" %%a in (`ipconfig ^| findstr /r "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*"`) do (
set _temp=%%a
rem remove leading space
set _ipaddress=!_temp:~1!
set _bad=0
if [!_ipaddress:~-2!]==[.0] set _bad=1
if [!_ipaddress:~-2!]==[.1] set _bad=1
if [!_bad!]==[0] (
if [!_alladdress!]==[] (
set _alladdress=!_ipaddress!
) else (
set _alladdress=!_alladdress!,!_ipaddress!
)
)
)
IF EXIST "%CD%/spec.yaml" (
docker run --rm --name minifab -v /var/run/docker.sock:/var/run/docker.sock -v %CD%/vars:/home/vars ^
-v %CD%/spec.yaml:/home/spec.yaml -e "ADDRS=!_alladdress!" hfrd/minifab:latest /home/main.sh %*
) ELSE (
docker run --rm --name minifab -v /var/run/docker.sock:/var/run/docker.sock -v %CD%/vars:/home/vars ^
-e "ADDRS=!_alladdress!" hfrd/minifab:latest /home/main.sh %*
)
endlocal
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/stone-ch/minifabric.git
git@gitee.com:stone-ch/minifabric.git
stone-ch
minifabric
minifabric
master

搜索帮助