Search code examples
openrewrite

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


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 -
------
-----

Solution

  • 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