diff --git a/Dockerfile b/Dockerfile index 54593c0..9c8e6fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,5 +40,6 @@ COPY --from=rulesets /rulesets/default/generated /opt/rulesets COPY --from=rulesets /windup-rulesets/rules/rules-reviewed/openrewrite /opt/openrewrite COPY --from=static-report /usr/bin/js-bundle-generator /usr/local/bin COPY --from=static-report /usr/local/static-report /usr/local/static-report +COPY entrypoint.sh /usr/bin/entrypoint.sh ENTRYPOINT ["kantra"] diff --git a/cmd/analyze.go b/cmd/analyze.go index ef8fa14..d8138f7 100644 --- a/cmd/analyze.go +++ b/cmd/analyze.go @@ -638,7 +638,7 @@ func (a *analyzeCommand) RunAnalysis(ctx context.Context, xmlOutputDir string) e WithStdout(analysisLog), WithStderr(analysisLog), WithEntrypointArgs(args...), - WithEntrypointBin("/usr/bin/konveyor-analyzer"), + WithEntrypointBin("/usr/bin/entrypoint.sh"), WithCleanup(a.cleanup), ) if err != nil { diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..db205e1 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -x + +cp -r /opt/input/source /tmp/source-code +sed -i 's|/opt/input/source|/tmp/source-code|g' /opt/input/config/settings.json +/usr/bin/konveyor-analyzer `"$@"` +sed -i 's|/tmp/source-code|/opt/input/source|g' /opt/input/config/settings.json