generated from konveyor-ecosystem/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9aa8af
commit 835a6c1
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM quay.io/konveyor/windup-shim:latest as shim | ||
|
||
FROM registry.access.redhat.com/ubi9-minimal as rulesets | ||
|
||
RUN microdnf -y install git &&\ | ||
git clone https://github.com/konveyor/rulesets &&\ | ||
git clone https://github.com/windup/windup-rulesets -b 6.2.3.Final | ||
|
||
FROM quay.io/konveyor/static-report as static-report | ||
|
||
# Build the manager binary | ||
FROM golang:1.18 as builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY main.go main.go | ||
COPY cmd/ cmd/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -o kantra main.go | ||
|
||
FROM quay.io/konveyor/analyzer-lsp:latest | ||
|
||
RUN mkdir /opt/rulesets /opt/rulesets/input /opt/openrewrite /opt/input /opt/output /opt/xmlrules /opt/shimoutput | ||
|
||
COPY --from=builder /workspace/kantra /usr/local/bin/kantra | ||
COPY --from=shim /usr/bin/windup-shim /usr/local/bin | ||
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 | ||
|
||
ENTRYPOINT ["kantra"] |