【发布时间】:2018-11-08 15:02:47
【问题描述】:
我的目标是使用 maven:latest 设置 Dockerfile,以便能够使用最新版本的 org.mozilla.rhino 运行我的 javascript 代码
FROM maven:latest
RUN [ "mvn", "dependency:get", "-Dartifact=org.mozilla:rhino:LATEST:jar" ]
RUN [ "mvn", "exec:java" "-Dexec.mainClass='org.mozilla.javascript.tools.shell.Main'" "-Dexec.args='src/index.js'"]
我是否需要一个 pom.xml 才能做到这一点,如果我需要 我的 pom.xml 应该包含什么,因为我的项目只有 javascript 文件?
PS:我之前没有使用过 maven 的经验
【问题讨论】:
-
上面引用的问题部分回答了我的问题,但我的
pom.xml需要一些帮助
标签: javascript maven docker rhino