#Getting ballerina running in a custom docker image

1 messages · Page 1 of 1 (latest)

hard dagger
#

I want to run ballerina in an alpine based image. Installed java 17(jre) and set the JAVA_HOME, JAVA_CMD and other variables. when I run "bal --version", it gives me the following.
"Error: JAVA_HOME is not defined correctly."
I used the zip installation method.

Also, which of the following is the correct executable?
ballerina-2201.8.4-swan-lake/bin/bal or
ballerina-2201.8.4-swan-lake/distributions/ballerina-2201.8.4/bin/bal

edgy crest
#

Did you defined the env as below?

ENV JAVA_HOME /usr/lib/jvm/...
#

You don't necessarily have to install it using zip. You can install it in below way as well.

RUN wget -q https://dist.ballerina.io/downloads/2201.8.4/ballerina-2201.8.4-swan-lake-linux-x64.deb
RUN dpkg -i ballerina-2201.8.4-swan-lake-linux-x64.deb
RUN rm ballerina-2201.8.4-swan-lake-linux-x64.deb
hard dagger
edgy crest
#

The correct path is ballerina-2201.8.4-swan-lake/bin/bal.

hard dagger
edgy crest
#

Which method did you refer by this?

hard dagger
#

by using dpkg -i ballerina...

edgy crest
#

Yes.