X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pm-file-converter%2FDockerfile;h=6248698cda96579bb744a4ab234bef4401b97d30;hb=fa1c2b41efdc6e4a0060478d4ecbf18b464710c0;hp=38f1b92182a77afe30bf579aa4f00cc23c88fad4;hpb=5a01ec4da9c004c8b74d2997ee7d3ffa77dfaf95;p=nonrtric%2Fplt%2Franpm.git diff --git a/pm-file-converter/Dockerfile b/pm-file-converter/Dockerfile index 38f1b92..6248698 100644 --- a/pm-file-converter/Dockerfile +++ b/pm-file-converter/Dockerfile @@ -15,20 +15,24 @@ # ============LICENSE_END================================================= # -FROM golang:1.19-bullseye AS build +FROM golang:1.20.3-buster AS build + WORKDIR /app -COPY go.mod . -COPY go.sum . -RUN go mod download + COPY main.go . -RUN go build -o /kafka-pm-producer +ADD common common +ADD components components +RUN go mod init main +RUN go mod tidy + +RUN go build -o /pm-file-converter #Replaced distroless image with ubuntu for debug purpose #FROM gcr.io/distroless/base-debian11 FROM ubuntu WORKDIR / ## Copy from "build" stage -COPY --from=build /kafka-pm-producer . +COPY --from=build /pm-file-converter . COPY server.key /server.key COPY server.crt /server.crt @@ -36,4 +40,4 @@ COPY application_configuration.json /application_configuration.json ##Uncomment this when using distroless image #USER nonroot:nonroot -ENTRYPOINT ["/kafka-pm-producer"] +ENTRYPOINT ["/pm-file-converter"]