这个很奇怪:
(记事本++):
### Init mongo-express
docker run -d \
--network mongo-network \
--name mongo-express \
-p 8081:8081 \
-e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \
-e ME_CONFIG_MONGODB_SERVER="mongodb" \
-e ME_CONFIG_BASICAUTH_USERNAME="<user>" \
-e ME_CONFIG_BASICAUTH_PASSWORD="<pass>" \
-e ME_CONFIG_MONGODB_URL="mongodb://<user>:<pass>@mongodb:27017/" \
--name mongo-express mongo-express
为清楚起见添加图像:
将上述内容复制到 cygwin 终端中会产生:
docker run -d \
> --network mongo-network \
> --name mongo-express \
> -p 8081:8081 \
> -e ME_CONFIG_OPTIONS_EDITORTHEME="ambiance" \
> -e ME_CONFIG_MONGODB_SERVER="mongodb" \
> -e ME_CONFIG_BASICAUTH_USERNAME="<user>" \
> -e ME_CONFIG_BASICAUTH_PASSWORD="<pass>" \
> notes.md -e ME_CONFIG_MONGODB_URL="mongodb://<user>:<pass>@mongodb:27017/" \
> --name mongo-express mongo-express
notes.md
参数是文件的名称。它是如何以及为什么被粘贴的?