0

I have created a monolith app using jhipster. I ran ./gradlew -Pprod bootJar jibDockerBuild --offline which created the onlinestore docker image on my local.

Now there are couple of things that I am not able to get my head around: 1. where do I put the configuration so that the created docker image can be pushed to my own docker hub. let's say I have created a docker hub registry for my app mandaltu123/onlinestore:latest.

Tuhin Subhra Mandal
  • 473
  • 1
  • 5
  • 15

1 Answers1

0

Do following:

  1. Login to your new registry with command : docker login

  2. Tag your image to push using : docker tag myonlineStore mandaltu123/onlinestore:latest

  3. Push the image using : docker push mandaltu123/onlinestore:latest

ankidaemon
  • 1,363
  • 14
  • 20
  • Thanks ankidaemon, this should work. I wanted to know that in jhipster autogenerated code, I do not see a docker file. Is there a way to add these configurations to some config in jhipster app so that image creation can be done automatically with my passed in docker registry ? – Tuhin Subhra Mandal Nov 27 '19 at 09:53
  • dockerfile you can extract from the image, look at this thread-> https://stackoverflow.com/questions/19104847/how-to-generate-a-dockerfile-from-an-image – ankidaemon Nov 27 '19 at 09:58
  • Jhipster uses jib to build docker images. You can build the image with Gradle/maven https://www.jhipster.tech/docker-compose/#-building-and-running-a-docker-image-of-your-application. You can define where to push the image and how to login at the registry via -Djib.to.x parameters. – atomfrede Dec 07 '19 at 06:42