Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose build失败 #33

Open
gexinworks opened this issue Oct 29, 2020 · 6 comments
Open

docker-compose build失败 #33

gexinworks opened this issue Oct 29, 2020 · 6 comments

Comments

@gexinworks
Copy link

image

@sawyerwu
Copy link

sawyerwu commented Nov 5, 2020

@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生成相对应到包应该就可以了。

@gexinworks
Copy link
Author

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

@gexinworks
Copy link
Author

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

@robberphex
Copy link
Collaborator

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

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

@gexinworks
Copy link
Author

gexinworks commented Dec 24, 2020

mvn clean compile package

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

@gexinworks
Copy link
Author

gexinworks commented Dec 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants