0
[INFO] --- docker-maven-plugin:1.0.0:build (default) @ bookstore ---
18:35:34.921 [main] DEBUG com.spotify.docker.client.DockerCertificates - /root/.docker/ca.pem, /root/.docker/key.pem or /root/.docker/cert.pem does not exist, not using SSL
18:35:35.076 [main] DEBUG com.spotify.docker.client.DockerConfigReader - Using configfile: /root/.dockercfg 
[WARNING] No entry found in settings.xml for serverId=docker-hub, cannot configure authentication for that registry
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] Copying /home/ales/Git/BookStore/target/bookstore-1.war -> /home/ales/Git/BookStore/target/docker/bookstore-1.war

i am trying to containerizing the java web app (which i have got from web as a sample) , i am using maven to build app and using spotify plugin to convert war to dockerimage.

when i run mvn clean package docker:build it gets stuck copying step and doesn't proceed further.

Note: my project name is Bookstore.

This is the error that issued after a long run of copy command ,

[INFO] 
[INFO] --- maven-war-plugin:2.6:war (default-war) @ bookstore ---
[INFO] Packaging webapp
[INFO] Assembling webapp [bookstore] in [/home/ales/Git/BookStore/target/bookstore-1]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/ales/Git/BookStore/WebContent]
[INFO] Webapp assembled in [110 msecs]
[INFO] Building war: /home/ales/Git/BookStore/target/bookstore-1.war
[INFO] 
[INFO] --- docker-maven-plugin:1.0.0:build (default) @ bookstore ---
23:31:08.311 [main] DEBUG com.spotify.docker.client.DockerCertificates - /home/ales/.docker/ca.pem, /home/ales/.docker/key.pem or /home/ales/.docker/cert.pem does not exist, not using SSL
23:31:08.567 [main] DEBUG com.spotify.docker.client.DockerConfigReader - Using configfile: /home/ales/.docker/config.json
[WARNING] No entry found in settings.xml for serverId=docker-hub, cannot configure authentication for that registry
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] Copying /home/ales/Git/BookStore/target/bookstore-1.war -> /home/ales/Git/BookStore/target/docker/bookstore-1.war
[ERROR] Java heap space -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

Arjun Sharma
  • 101
  • 2
  • 2
  • 10
  • Permissions problems I think, you are running docker as root it seems: `Using configfile: /root/.dockercfg` but trying to read the war from your user space. There's no need to run as root and in fact is not advisable. Setup docker to be able to run as user and go from there. – LMC Sep 23 '19 at 15:42
  • your answer is sounding good to me and it seems like you have got the root of problem , but again as a newbie i will say , may you provide me , what steps to do to solve this problem? or provide me link of article which refer to this problem. Thanks a lot , you are helping me securing my career. – Arjun Sharma Sep 23 '19 at 15:53
  • https://docs.docker.com/install/linux/linux-postinstall/ – LMC Sep 23 '19 at 16:53
  • may you help me a bit , actually what i am doing is i build my app with mvn , i issue command on terminal and i use STS IDE for coding purposes , but what problem i am encountring is when i try to clean the project it is unable to clean the target folder and when i run the same command with sudo then it run , but in cost of that only root gets the full control of the folder , i think that is why it stucks on copying instruction. What can be the possible solution to this ? – Arjun Sharma Sep 24 '19 at 17:43
  • Aye , i have resolved that permission issue , just used chmod command on target directory and yeah it went nice. But it still stucks at copying step. – Arjun Sharma Sep 24 '19 at 18:03
  • You are on the track :p, that's how fixing problems and learning works. Give some time to learn Linux fundamentals, it's a must on backend stuff. – LMC Sep 24 '19 at 18:08
  • I will learn it soon , but i am in second round of competition(TCS InfraMind) and the deadline is 11 Oct and i have to do a lot of work (even tho i am stuck at the first step) , thats why ican't give too much time to learn a technology now all i am trying to do is just making my way to go through all of the required technologies. – Arjun Sharma Sep 24 '19 at 18:17
  • @LuisMuñoz , may you try to build my web app and see if it run on your machine or not , here is the [Github](https://github.com/ales-blaze/BookStore.git) link to it. – Arjun Sharma Sep 25 '19 at 06:38
  • What's current status? Still the same [OutOfMemory](https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError)? – LMC Sep 25 '19 at 13:17
  • @Luis build success , thankyou so much for helping out! – Arjun Sharma Sep 25 '19 at 14:47
  • Glad to be of help. – LMC Sep 25 '19 at 15:26

0 Answers0