Closed matejvasek closed 2 years ago
LGTM - what happens when
$PORT
is empty?
@lance good question, if the var is not explicitly set, then the value is taken from runner image (we set it to 8080), however if the var is explicitly set to empty string:
docker run -ePORT="" -p 1234:8080 -it image-registry.openshift-image-registry.svc.cluster.local:5000/default/foobar:latest
exec java -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port= -Djava.util.logging.manager=org.jboss.logmanager.LogManager -XX:+ExitOnOutOfMemoryError -cp . -jar /layers/com.redhat.faas.quarkus-jvm/app/app.jar
Oct 15, 2020 5:28:17 PM io.quarkus.config
ERROR: Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Oct 15, 2020 5:28:17 PM io.quarkus.application
ERROR: Failed to start application (with profile prod)
io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Is that OK?
then the value is taken from runner image (we set it to 8080)
Our runner images contain line
ENV PORT 8080
Is that OK?
I think that's fine. The only circumstance I can see where a user would actually do this is if they were expecting an env var to contain the value and for some reason it was empty.
@matejvasek what is the status of this?
This is not any critical since the port is going to be almost always 8080.