-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create docker image #25
Comments
Hi @mgh87 , you mean the Heroku deployment process? So using a Docker image and the Heroku Docker Registry to deploy the app, inkl. TravisCI integration?!? Why not 😃 - would be great to see it. Cheers |
Just thought at first about the approach from https://spring.io/guides/gs/spring-boot-docker/ But I can also have a look at Heroku+TravisCi. |
I have setup this. And this was actually pretty easy.
|
Hey @mgh87 - didn't have the time until now, but I provided the project with a full Dockerfile to build & run the complete app. If you need more information, have a look into the docs at: https://github.com/jonashackt/spring-boot-vuejs#build-and-run-with-docker I didn't want to use the really great dockerfile-maven-plugin as @Doogiemuc mentioned - all because I wanted a more in-depth approach, where there's no so much magic and everyone can have a look into what's going on. The Dockerfile therefore uses Docker multi-stage build, where the second stage is lent from @mgh87 's mentioned guide https://spring.io/guides/gs/spring-boot-docker/:
With that, there are no build artifacts left in the resulting Docker image. Additionally it is also crucial to use a .dockerignore file - otherwise underlying OS specific node modules will be copied into the Docker build container, which could lead to problems (like as with my Mac ✌️ ):
Just build your own Docker image with |
That's really nice! Didn't find the time to do it. 😿 |
Hey jonas,
Would you be interested in a pullrequest that enhanced your build with the possibility to build a docker image to deploy your application and showcase this deployment strategy?
Kind regards
The text was updated successfully, but these errors were encountered: