X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pm-rapp%2FDockerfile;h=1869c365027336860bae35c96f7b15f34a5fbe29;hb=18a22955ab912a29de5c2e62322222a8324cfeaa;hp=1d138c5196e883d5f4daaca063d6719def2af2fa;hpb=c5655db5780275b07b25b57b767808f2f1eac7d9;p=nonrtric%2Fplt%2Franpm.git diff --git a/pm-rapp/Dockerfile b/pm-rapp/Dockerfile index 1d138c5..1869c36 100644 --- a/pm-rapp/Dockerfile +++ b/pm-rapp/Dockerfile @@ -15,21 +15,20 @@ # ============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 mod init main +RUN go mod tidy + RUN go build -o /pm-rapp -#Replaced distroless image with ubuntu for debug purposes (seem to be cert problems with distroless image...?) FROM gcr.io/distroless/base-debian11 -#FROM ubuntu + WORKDIR / ## Copy from "build" stage COPY --from=build /pm-rapp . -##Uncomment this when using distroless image -USER nonroot:nonroot ENTRYPOINT ["/pm-rapp"]