小编B.Z*_*nov的帖子

从 docker 镜像运行 Maven 命令

我正在 gitlab runner 中构建一个 docker 镜像。所以,我使用 docker:latest 镜像,因为我需要将镜像推送到注册表,但在构建镜像之前,我需要打包我的 java 项目。如何使用docker镜像和maven来构建项目?

现在,gitlab runner 返回错误

$ docker run -it --rm -v "$(pwd)":/opt/maven -w /opt/maven maven:3.3.9-jdk-8 mvn clean install
the input device is not a TTY
ERROR: Job failed: exit code 1
Run Code Online (Sandbox Code Playgroud)

java continuous-integration maven gitlab docker

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

continuous-integration ×1

docker ×1

gitlab ×1

java ×1

maven ×1