Deploying a Lagom application to OpenShift - error when pushing to OpenShift registry

Good Day

My name is Cian

I have been following the guide on " Deploying a Lagom application to OpenShift" (https://developer.lightbend.com/guides/openshift-deployment/index.html) for the Java Maven shopping cart example Lagom 1.5.1 application.

I followed the guide exactly and everything works fine until I get to the " Building using Maven" section where I get an error at the “Building the docker image” subsection. More specifically, I get an error when I build the docker images, tag them and push them to the OpenShift repository using the command mvn -Ddocker.useOpenShiftAuth -Ddocker.registry=$DOCKER_REPO_URL/$NAMESPACE -am -pl shopping-cart package docker:push. The error I receive is: [ERROR] DOCKER> Unable to pull 'adoptopenjdk/openjdk8:latest' from registry '172.30.1.1:5000/' : Error parsing reference: "172.30.1.1:5000//adoptopenjdk/openjdk8" is not a valid repository/tag: invalid reference format (Internal Server Error: 500) [Error parsing reference: "172.30.1.1:5000//adoptopenjdk/openjdk8" is not a valid repository/tag: invalid reference format (Internal Server Error: 500)]

Note I am using Minishift and my DOCKER_REPO_URL was set as in the guide using DOCKER_REPO_URL=$(minishift openshift registry). My namespace is also the same as in the guide; that is, NAMESPACE=myproject.

How do I resolve this error? I am not sure what is wrong or why it’s complaining since I followed the guide exactly.

Any assistance regarding this issue would be greatly appreciated.

Thank You

Answer:

Before you can push to OpenShift’s built in docker registry, you need to log into it (as explained in the tutorial) and then execute docker pull adoptopenjdk/openjdk8.

Then continue with the steps in the tutorial.

When building lagom application from s2i of Openshif, I am getting an error saying DOCKER_HOST not mentioned. What will be the docker host in openshift …

I am now trying to use Job maven pligin instaed of docker maven plugin, so that I dont need to get hold of Docker. is there any one there who already have used the same, it would be o great help if it is shared.
I want to use it with s2i on openshift
Thanks
Raj