alibabacloud-microservice-demo icon indicating copy to clipboard operation
alibabacloud-microservice-demo copied to clipboard

docker-compose build失败

Open gexinworks opened this issue 5 years ago • 6 comments

image

gexinworks avatar Oct 29 '20 07:10 gexinworks

@wjzhangcsu 因为在frontend子工程下mvn命令没有运行而导致target目录没有生成。我尝试了一下在frontend工程下执行build.sh,项目构建报错如下"Could not resolve dependencies for project com.alibabacloud.hipstershop:frontend:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.alibabacloud.hipstershop:cartservice-api:jar:1.0.0-SNAPSHOT, com.alibabacloud.hipstershop:checkoutservice-api:jar:0.0.1-SNAPSHOT: Could not find artifact com.alibabacloud.hipstershop:cartservice-api:jar:1.0.0-SNAPSHOT",所以到以上报错的每一个子工程下执行build.sh生成相对应到包应该就可以了。

sawyerwu avatar Nov 05 '20 10:11 sawyerwu

不如写在构建里面,我晚点试试吧~

gexinworks avatar Dec 22 '20 03:12 gexinworks

并不能构建成功。而且单独跑也跑不通~

gexinworks avatar Dec 23 '20 11:12 gexinworks

mvn命令直接在src/frontend目录下单独执行可能无法成功构建。

先在项目根目录,比如alibabacloud-microservice-demo/目录下执行mvn clean compile package,就能得到.jar文件。 然后在src/frontend执行build.sh就可以成功构建镜像。

robberphex avatar Dec 23 '20 12:12 robberphex

mvn clean compile package

不是frontend构建不成功,是其他的镜像不行,不知道和我本地环境有没有关系。构建成功的镜像如下: image

gexinworks avatar Dec 24 '20 13:12 gexinworks

我的环境是MACOS,docker是19.03.12,docker-compose是1.26.2,我还是看看google原来是怎么搞的吧.

gexinworks avatar Dec 24 '20 13:12 gexinworks