#730  agent镜像 构建maven项目
Closed
dim opened 2 years ago

我用docker启动了一个agent,安装agent的系统安装了mvn和jdk 执行build使用mvn package 提示没有mvn命令。 如果用maven镜像执行会提示下面 This step can only be executed by server docker executor, remote docker executor, or kubernetes executor

额,agent镜像怎么执行mvn指令。

Robin Shen changed fields 2 years ago
Name Previous Value Current Value
Type
Bug
Support Request
Robin Shen commented 2 years ago

安装agent的系统安装了mvn和jdk

是指在运行agent容器的host机器上安装了mvn和jdk吗?如果那样,agent怎么能够访问呢?一般来说你需要在自己的镜像里安装这些工具,然后在command step里指定使用该镜像。而且需要用remote docker executor来执行对应的job

dim commented 2 years ago

好吧, 看来是要用镜像中执行镜像了:rofl:

Robin Shen changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
Robin Shen commented 2 years ago

如果要用remote shell executor的话,最好裸机方式运行agent,这样agent才能直接访问到裸机上安装的maven等工具。

dim commented 2 years ago

感谢

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
onedev/server#730
Please wait...
Page is in error, reload to recover