OpenRewrite: Do we have recipes available for .Docker File change?If not then what approach we should follow to change Docker file through OpenRewrite

huangapple go评论103阅读模式
英文:

OpenRewrite: Do we have recipes available for .Docker File change?If not then what approach we should follow to change Docker file through OpenRewrite

问题

通过OpenRewrite更新Docker文件(如果可能)。

我愿意通过OpenRewrite更新Docker文件中的Java版本。

FROM amazoncorretto:17
USER root
RUN yum update -y
RUN yum upgrade -y
RUN yum update -
英文:

docker file update through openrewrite if possible.

I am willing to to update Java version in docker file through OpenRewrite.

**FROM amazoncorretto:17**
USER root
RUN yum update -y
RUN yum upgrade -y
RUN yum update -
------
-----

答案1

得分: 1

我认为纯文本配方是我们目前能做的最好的,直到我们获得一个专门用于Docker的解析器。您可以尝试查找和替换的配方,看它是否适合您的用例:https://docs.openrewrite.org/recipes/text/findandreplace

英文:

I think that plain text recipes is the best we can do here, until we get a dedicated parser for Docker. You could try if the find and replace one fits your use case: https://docs.openrewrite.org/recipes/text/findandreplace

huangapple
  • 本文由 发表于 2023年7月10日 20:10:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76653601.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定