-
Notifications
You must be signed in to change notification settings - Fork 84
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
EXPOSE 8080 #115
Comments
@vorburger what's about
? Actually I'm not sure how to reliably define a default port to expose in the s2i builder image as this is supposed to run all sort of Maven builds and obviously the builder image can not know the port of the application which is build with this image in advance. I wonder, whether the S2I mechanism itself has an answer for this as I suppose to be an issue for any s2i source build. I think there should be a s2i config which defines this port and which uses the s2i build mechanism to expose on the final image it creates after a build. Let me research a bit ... |
Hey @rhuss, any further insights on that one? What you suggest above doesn't seem to work for me, as the image doesn't export port 8080. So I'm wondering how I'd e.g. use this image to run WildFly Swarm on OpenShift. Glad about any ideas you may have :) |
Actually in a Dockerfile Historically the only reason why And sorry, haven't done my homework yet. Not sure whether there is an S2I mean to provide this meta data for the resulting image. |
I still don't understand how this was ever supposed to work - I cannot get the basic example running on OpenShift without manually editing the Service YAML and adding port 8080 - this somehow feels stupid. |
Hey @rhuss, any news on this one? I currently need to patch each application using that S2I builder:
It'd be really cool if this could be simplified a bit. |
@gunnarmorling sorry, no yet. It looks like that the Instead, we need to convince @goldmann any idea how a custom port can be exposed by an s2i builder image so that it's picked up for the service generated via |
@rhuss @gunnarmorling @edewit @alexkieling @goldmann how crazy would it be if I seriously suggested that we "resolve" this 'annoying' issue by simply adding a hard-coded It's not "perfect", because yes one could run whatever one runs to listen in this container on another port, but the default of Spring Boot and Thorntail.io probably is 8080, and this would be a useful simplification IMHO. It's not a big "problem" to add this hard-coded, because if you run it on another port, you'll have to customize anyway, to add your own port, and you could then also drop the |
@vorburger I think it's a good idea it's a sensible default |
Merged. FTR: I've not really tested if, how and where one can customize that new |
FTR: It's not actually customizable; for now, |
strike that, I reverted that, so |
How is this still an issue in 2022. What if the application defaults to a different port like for mysql server? or javascript frameworks? I have to manually update the services target port for it to work but it doesnt let you in the command line... |
Unless I'm missing something in how this is to be used, don't we need to have a way to specify which port, in addition to 8778 and 9779, is to be EXPOSE'd in the Dockerfile for the "microservices with a flat classpath" (quote from README) to be accessible by a Service and Route?
Because without hacking that, I cannot get e.g. this to work:
PS: An
oc expose svc/s2i-java-example
will create a route on port 8778, which of course isn't what one would want.The text was updated successfully, but these errors were encountered: