New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile and instructions for building/running with Docker #339
Comments
I have a branch that adds Docker, Kubernetes and Knative into the mix - planning on submitting a PR at some point - https://github.com/trisberg/spring-petclinic/tree/kubernetes |
awesome @trisberg this will be a great building block towards that PR :) |
You should be able to build in |
I would open a separate issue about that if I were you. It doesn't really seem relevant to docker. |
I don't have any problem with helping people to build a jar file, but I don't think this project needs a Dockerfile. I know a lot of people are forced to use Dockerfiles and build containers manually, but that's not an excuse for encouraging that pattern by exposing beginners (most of the target audience for Petclinic) to it needlessly. You only need a JDK to build and run the app, so lets make that clearer, and not confuse people by introducing other options. There is a guide about building a docker container from a Spring Boot application at https://spring.io/guides/gs/spring-boot-docker/. Actually there are multiple different ways of doing it, so it's not really something we want to get into in this project. If you need to give a demo and want a public repository to point to, there's nothing wrong with putting a Dockerfile in your fork of Petclinic IMO. |
@paulczar I apologize if closing your original PR wasn't motivated enough. Hopefully, Dave's comment fixes that part. Please report what was confusing about building the app in a separate issue and we'll have a look. |
Hi,
I submitted what I thought would be an noncontroversial PR (#338) for adding a Dockerfile and basic instructions on how to run petclinic in Docker. To my surprise it was closed rather than merged in.
I thought I should open an issue to explain my case more thoroughly for adding it in. I'm working on doing demos and tutorials for Kubernetes and tooling around it like Spinnaker and Knative of which I'll be presenting at conferences and other events such as Spring One Tour in Chicago and Istanbul.
Given I'll be presenting at some Spring events I feel its important to showcase Spring applications in my demonstrations, but at minimum to do this I need a Dockerfile in the repository (yes I could fork it and use my own version of the repo, but I'd rather people be able to replicate what I do using the original repos).
That aside as somebody who is not a Java developer let alone spring, I had no idea where to even start building this application into a
.jar
, let alone running it on a container platform like Kubernetes. I had to guess my way through compatible versions ofopenjdk
andmaven
in order to be able to build it into a .jar and then run it. This is not the best experience for a new user or somebody interested in seeing what this whole Spring thing is all about.At this stage most people have a familiarity with Docker and can run Docker images fairly simply in their development environments (Even Windows Laptops!) and having a Docker option means they don't need to install a JDK, Maven, Eclipse, etc on their machine just to start kicking the tires.
Hopefully I've made my case successfully and we can look at merging in my Dockerfile and instructions, or at least have a fruitful code review of it so that I can help in some way to make Spring a more approachable language to run on various cloud native platforms.
The text was updated successfully, but these errors were encountered: