X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Dockerfile;h=3a0f87067c2fe4c112868d446b3f825d3af32ad8;hb=HEAD;hp=5b0bf95be3a981bdcf583b4c011d1153960f4659;hpb=e8b05b6a0f6fa82ddb2a4e9c9a90629b7528a809;p=ric-plt%2Fappmgr.git diff --git a/Dockerfile b/Dockerfile index 5b0bf95..3a0f870 100755 --- a/Dockerfile +++ b/Dockerfile @@ -13,24 +13,29 @@ # See the License for the specific language governing permissions and # limitations under the License. -#---------------------------------------------------------- +#----------------------------------------------------------- -FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:3-u18.04-nng AS appmgr-build +FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 AS appmgr-build RUN apt-get update -y && apt-get install -y jq +# Update CA certificates +RUN apt update && apt install --reinstall -y \ + ca-certificates \ + && \ + update-ca-certificates + ENV PATH="/usr/local/go/bin:${PATH}" -ARG HELMVERSION=v2.12.3 # Install helm -RUN wget -nv https://storage.googleapis.com/kubernetes-helm/helm-${HELMVERSION}-linux-amd64.tar.gz \ - && tar -zxvf helm-${HELMVERSION}-linux-amd64.tar.gz \ - && cp linux-amd64/helm /usr/local/bin/helm \ - && rm -rf helm-${HELMVERSION}-linux-amd64.tar.gz \ - && rm -rf linux-amd64 +#RUN wget -nv https://storage.googleapis.com/kubernetes-helm/helm-${HELMVERSION}-linux-amd64.tar.gz \ +# && tar -zxvf helm-${HELMVERSION}-linux-amd64.tar.gz \ +# && cp linux-amd64/helm /usr/local/bin/helm \ +# && rm -rf helm-${HELMVERSION}-linux-amd64.tar.gz \ +# && rm -rf linux-amd64 # Install kubectl from Docker Hub -COPY --from=lachlanevenson/k8s-kubectl:v1.10.3 /usr/local/bin/kubectl /usr/local/bin/kubectl +#COPY --from=lachlanevenson/k8s-kubectl:v1.16.0 /usr/local/bin/kubectl /usr/local/bin/kubectl ENV GOPATH="/go" @@ -61,26 +66,26 @@ COPY . /go/src/ws RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/src/ws/cache/go/cmd/appmgr cmd/appmgr.go # Run unit tests -RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go test -p 1 -cover ./pkg/cm/ ./pkg/helm/ ./pkg/resthooks/ +RUN GO111MODULE=on GO_ENABLED=0 GOOS=linux go test -p 1 -cover ./pkg/resthooks/ RUN gofmt -l $(find cmd/ pkg/ -name '*.go' -not -name '*_test.go') CMD ["/bin/bash"] #---------------------------------------------------------- -FROM ubuntu:18.04 as appmgr +FROM ubuntu:20.04 as appmgr RUN apt-get update -y \ - && apt-get install -y sudo openssl ca-certificates ca-cacert \ - && apt-get clean + && apt-get install --reinstall -y sudo openssl ca-certificates ca-cacert \ + && apt-get clean && update-ca-certificates # # libraries and helm # COPY --from=appmgr-build /usr/local/include/ /usr/local/include/ COPY --from=appmgr-build /usr/local/lib/ /usr/local/lib/ -COPY --from=appmgr-build /usr/local/bin/helm /usr/local/bin/helm -COPY --from=appmgr-build /usr/local/bin/kubectl /usr/local/bin/kubectl +#COPY --from=appmgr-build /usr/local/bin/helm /usr/local/bin/helm +#COPY --from=appmgr-build /usr/local/bin/kubectl /usr/local/bin/kubectl RUN ldconfig