Null Pointer exception when building docker file from NetBeans

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Null Pointer exception when building docker file from NetBeans



This is a simple Maven project created with NetBeans and a simple


System.out.println("hello world");



in the main class.



Docker is running and available as a service in NetBeans.



The Docker file is:


FROM anapsix/alpine-java:latest
copy target/TestDocker-1.0-SNAPSHOT.jar .
CMD ["java","-jar", "TestDocker-1.0-SNAPSHOT.jar"]



When building the file, the error is:


java.lang.NullPointerException
at org.netbeans.core.output2.OutWriter.printANSI(OutWriter.java:632)
at org.netbeans.core.output2.OutWriter.print(OutWriter.java:591)
at org.netbeans.core.output2.ErrWriter.print(ErrWriter.java:211)
at org.netbeans.core.output2.ErrWriter.println(ErrWriter.java:165)
at org.netbeans.modules.docker.ui.build2.BuildTask.run(BuildTask.java:200)
at org.netbeans.modules.docker.ui.build2.BuildImageWizard$1.run(BuildImageWizard.java:276)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)





Is that your full Dockerfile? Does it have a FROM instruction?
– DragonAssassin
2 hours ago





I forgot to add the FROM line in the SA question but it was indeed there in my Docker file. Edited the question to add it.
– seinecle
43 secs ago










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard