【发布时间】:2021-10-29 05:29:43
【问题描述】:
我一直这样使用docker build:
docker build --network host -t foo/bar
但现在我正在尝试使用spring-boot:build-image
mvn spring-boot:build-image -Dspring-boot.build-image.imageName=foo/bar
但是这种方式没有提供--network 选项。不幸的是,没有找到正确提供选项的方法。
问题:如何为--network 提供spring-boot:build-image(假设我需要在build 期间而不是在run 期间提供此选项)?
【问题讨论】:
-
为什么需要禁用 Docker 的网络堆栈,尤其是在构建过程中?
-
@DavidMaze 这些是要求¯_(ツ)_/¯
标签: java spring-boot docker maven spring-boot-maven-plugin