I am trying to compile and run this on my ubuntu-24-04-01 VM running on VirtualBox.
The first time I fired:
sudo docker-compose up chirpstack-api-java-current-user
it gave a warning:
WARNING: The CURRENT_UID variable is not set. Defaulting to a blank string.
WARNING: The CURRENT_HOME variable is not set. Defaulting to a blank string.
and ran until:
ERROR: for chirpstack-api_chirpstack-api-java-current-user_1 Cannot start service chirpstack-api-java-current-user: error while creating mount source path ‘/.m2’: mkdir /.m2: read-only file system
ERROR: for chirpstack-api-java-current-user Cannot start service chirpstack-api-java-current-user: error while creating mount source path ‘/.m2’: mkdir /.m2: read-only file system
I changed the line in docker-compose.yml from :
and removed the line:
That allowed the build image to be successfully built. There is a build directory created under java/build with the build/target/chirpstack-api-3.12.4.jar and the rest of the artifacts all there
Towards the end of the log of the build we have:
chirpstack-api-java-current-user_1 | [INFO] Installing /chirpstack-api/java/build/target/chirpstack-api-3.12.4.jar to /var/maven/.m2/repository/io/chirpstack/chirpstack-api/3.12.4/chirpstack-api-3.12.4.jar
but neither on the image nor on my local VM I can find the /var/maven, let alone /var/maven/.m2. Is the log lying and the build install was not actually successful or this is by design? Since I notice on github Chirpstack-api java page it refers to the jar artifact to be installed to local maven repository $HOME/.m2 for the code snippet published there to be built. Has my changes to the environment variables in the playbook caused this or there’s something else which is the problem.
Also is there another docker-compose which needs to be fired up for building the code snippet in the link above? Or that is meant to be built directly on the VM using the jar generated (and somehow installed) by the original docker-compose. Looking at the above link I was not very sure how to build the snippet published there. (ie need to generate the maven source structure using mvn archetype:generate and mvn package on my VM or there’s another docker-compose for these?)