Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-24501

Deploy Docker Image wizard: NPE when trying to deploy image previously pushed to docker registry

XMLWordPrintable

    • devex #135 July 2017
    • Hide
      1. ASSERT: have the CDK with the registry that's not publicly reachable
      2. ASSERT: have a project with a docker file in your workspace (ex. clone git@github.com:redhat-helloworld-msa/hola.git)
      3. ASSERT: have a connection to the docker daemon in the CDK3
      4. EXEC: in package explorer: select your Dockerfile and pick Run As > Docker Image Build. Provide some image name and version, pick Docker Connection to the docker daemon in the CDK
      5. EXEC: once the image is built, go to "Docker Explorer", select the Docker image that you built and select "Deploy to OpenShift..."
      6. EXEC: In deploy docker image wizard: check "Push Image to Registry" and finish the wizard
      7. ASSERT: once the push is finished, the freshly pushed image should show up in the Docker explorer
      8. EXEC: in "Docker Explorer": select this image and pick "Deploy to OpenShift..."
      9. ASSERT: "Deploy Docker Image" wizard shows up, having "Image Name" set to your Docker image with the docker registry prefix
      10. EXEC: hit "Next"

      Result:
      The deploy fails with 2 error dialogs, the wizard stays open.
      One that tells you that the lookup failed and one that tells you about an NPE that happened:


      In the Eclipse log you'll find the following:

      java.lang.NullPointerException
      	at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DockerConfigMetaData.env(DockerConfigMetaData.java:69)
      	at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DeployImageWizardModel.initializeContainerInfo(DeployImageWizardModel.java:356)
      	at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DeployImagePage$1ImageValidatorJob.run(DeployImagePage.java:154)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
      
      Show
      ASSERT: have the CDK with the registry that's not publicly reachable ASSERT: have a project with a docker file in your workspace (ex. clone git@github.com:redhat-helloworld-msa/hola.git) ASSERT: have a connection to the docker daemon in the CDK3 EXEC: in package explorer: select your Dockerfile and pick Run As > Docker Image Build. Provide some image name and version, pick Docker Connection to the docker daemon in the CDK EXEC: once the image is built, go to "Docker Explorer", select the Docker image that you built and select "Deploy to OpenShift..." EXEC: In deploy docker image wizard: check "Push Image to Registry" and finish the wizard ASSERT: once the push is finished, the freshly pushed image should show up in the Docker explorer EXEC: in "Docker Explorer": select this image and pick "Deploy to OpenShift..." ASSERT: "Deploy Docker Image" wizard shows up, having "Image Name" set to your Docker image with the docker registry prefix EXEC: hit "Next" Result: The deploy fails with 2 error dialogs, the wizard stays open. One that tells you that the lookup failed and one that tells you about an NPE that happened: In the Eclipse log you'll find the following: java.lang.NullPointerException at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DockerConfigMetaData.env(DockerConfigMetaData.java:69) at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DeployImageWizardModel.initializeContainerInfo(DeployImageWizardModel.java:356) at org.jboss.tools.openshift.internal.ui.wizard.deployimage.DeployImagePage$1ImageValidatorJob.run(DeployImagePage.java:154) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

          adietish@redhat.com André Dietisheim
          adietish@redhat.com André Dietisheim
          Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

            Created:
            Updated:
            Resolved: