You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the http:Listner is declared separately the port is not taken.
Steps to reproduce:
Create a project with following sample code.
importballerina/http;
listenerhttp:ListenerhttpLis=newhttp:Listener(9090);
service / on httpLis {
// This function responds with `string` value `Hello, World!` to HTTP GET requests.resourcefunction get greeting() returnsstring {
return"Hello, World!";
}
}
Run the following command
bal build --cloud=docker
You can see the warning WARNING [main.bal:(6:14,6:21)] failed to retrieve port in the console and the generated Dockerfile doesn't contain the port.
Compiling source
anupama/dockertest:0.1.0
WARNING [main.bal:(6:14,6:21)] failed to retrieve port
Generating executable
Generating artifacts...
@kubernetes:Docker - complete 2/2
Execute the below command to run the generated Docker image:
docker run -d dockertest:latest
target/bin/dockertest.jar
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
The text was updated successfully, but these errors were encountered:
Description:
When the http:Listner is declared separately the port is not taken.
Steps to reproduce:
bal build --cloud=docker
WARNING [main.bal:(6:14,6:21)] failed to retrieve port
in the console and the generated Dockerfile doesn't contain the port.Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
The text was updated successfully, but these errors were encountered: