I have written a service in Ballerina and when I tried to build it using bal build --cloud=docker
, I get the following warning even if the build is successful.
default value is not specified for the configurable variable `port`. cloud artifacts will not be generated for this variable
Below is a sample code that gives this warning.
import ballerina/http;
configurable int port = ?;
service / on new http:Listener(port) {
}
Ballerina C2C extension currently only retrieves variables available at build time when building and generating the artifacts.
If you provide the port
value at build time in above sample you will find the generated Dockerfile
updated with the provided port exposed.