Re: Is the karaf 4.4.4 docker image arm only?
> Jean-Baptiste Onofré : > yes, the docker image is arm based. I'm adding multi-arch image > support (to have x86 images as well). > I will upload new images soon. Great! Thanks, JB!
Re: Is the karaf 4.4.4 docker image arm only?
> Francois Papon : > It means that your docker image is not immutable and after starting > the Karaf instance, it will download the updated dependencies features > at startup right? Correct! :-) > It's not the common design for docker image and I think it's better to > have a custom Karaf distribution and build a new docker image after > each dependencies update. I'm quite sure all docker enthusiasts would think like you do. :-) Me I just fell in love with the simplicity of the idea, which is similar to the elegance of installing from maven with features in regular karaf (which is the main feature, that made me fall in love with karaf in the first place. That, and karaf feature installs taking the hard part out of finding and loading the right bundles). But... these docker images needs an occasional update when the world changes (such as the OSGi version and possibly the JVM version).
Re: Is the karaf 4.4.4 docker image arm only?
Hi, yes, the docker image is arm based. I'm adding multi-arch image support (to have x86 images as well). I will upload new images soon. Regards JB On Mon, Jan 8, 2024 at 7:36 PM Steinar Bang wrote: > > > Jean-Baptiste Onofré : > > > Hi Steinar > > Let me check about the image type. > > Did you find out anything? > > The docker-maven-plugin I've been using (the one created by spotify), > was abandoned a couple of years back: > https://github.com/spotify/docker-maven-plugin > > So I've been trying to to use a docker-maven-plugin that is maintained: > https://github.com/fabric8io/docker-maven-plugin > > I've succeeded in building a sonar-collector docker image using the new > docker-maven-plugin, but I end up with an arm64 image here as well (even > though I'm building and running on amd64): > > https://github.com/fabric8io/docker-maven-plugin/issues/1739#issuecomment-1881260436 >
Re: Is the karaf 4.4.4 docker image arm only?
It means that your docker image is not immutable and after starting the Karaf instance, it will download the updated dependencies features at startup right? It's not the common design for docker image and I think it's better to have a custom Karaf distribution and build a new docker image after each dependencies update. But it's just my opinion for the Karaf docker image usage :) regards, François On 08/01/2024 20:45, Steinar Bang wrote: Francois Papon : Why not using Jib? https://github.com/GoogleContainerTools/jib/tree/master Unless I'm very mistaken that doesn't do what I want to do. Jib looks like it is for containering a Java application? What I'm doing is something different: 1. I start out with a standard karaf image 2. Then I create a Dockerfile that replaces the org.apache.karaf.features.cfg file with a file that a. has the applications feature repository added to featuresRepositories b, adds the application's feature to featuresBoot So I provision the application using maven and use LATEST, which means I don't have to update the image when the application is updated, I just restart the docker image and it pulls the latest version of the app from maven. That is: I will have to update the image when the world has changed too much (what fails right now is that OSGi 6 can't run OSGi 8 applications, and I can see that the Java version I'm building with can be an issue). I'm trying to create a new docker image for sonar-collector right now, but that is the first time in two years (I don't use the docker image myself, but apparently someone else did and ran into trouble recently).
Re: Is the karaf 4.4.4 docker image arm only?
> Francois Papon : > Why not using Jib? > https://github.com/GoogleContainerTools/jib/tree/master Unless I'm very mistaken that doesn't do what I want to do. Jib looks like it is for containering a Java application? What I'm doing is something different: 1. I start out with a standard karaf image 2. Then I create a Dockerfile that replaces the org.apache.karaf.features.cfg file with a file that a. has the applications feature repository added to featuresRepositories b, adds the application's feature to featuresBoot So I provision the application using maven and use LATEST, which means I don't have to update the image when the application is updated, I just restart the docker image and it pulls the latest version of the app from maven. That is: I will have to update the image when the world has changed too much (what fails right now is that OSGi 6 can't run OSGi 8 applications, and I can see that the Java version I'm building with can be an issue). I'm trying to create a new docker image for sonar-collector right now, but that is the first time in two years (I don't use the docker image myself, but apparently someone else did and ran into trouble recently).
Re: Is the karaf 4.4.4 docker image arm only?
Hi, Why not using Jib? https://github.com/GoogleContainerTools/jib/tree/master regards, François On 08/01/2024 19:36, Steinar Bang wrote: Jean-Baptiste Onofré : Hi Steinar Let me check about the image type. Did you find out anything? The docker-maven-plugin I've been using (the one created by spotify), was abandoned a couple of years back: https://github.com/spotify/docker-maven-plugin So I've been trying to to use a docker-maven-plugin that is maintained: https://github.com/fabric8io/docker-maven-plugin I've succeeded in building a sonar-collector docker image using the new docker-maven-plugin, but I end up with an arm64 image here as well (even though I'm building and running on amd64): https://github.com/fabric8io/docker-maven-plugin/issues/1739#issuecomment-1881260436
Re: Is the karaf 4.4.4 docker image arm only?
> Jean-Baptiste Onofré : > Hi Steinar > Let me check about the image type. Did you find out anything? The docker-maven-plugin I've been using (the one created by spotify), was abandoned a couple of years back: https://github.com/spotify/docker-maven-plugin So I've been trying to to use a docker-maven-plugin that is maintained: https://github.com/fabric8io/docker-maven-plugin I've succeeded in building a sonar-collector docker image using the new docker-maven-plugin, but I end up with an arm64 image here as well (even though I'm building and running on amd64): https://github.com/fabric8io/docker-maven-plugin/issues/1739#issuecomment-1881260436
Re: Is the karaf 4.4.4 docker image arm only?
Hi Steinar Let me check about the image type. Regards JB On Fri, Dec 22, 2023 at 5:44 PM Steinar Bang wrote: > > > Steinar Bang : > [snip!] > > Or try out the, completely different, docker-maven-plugin that comes up > > first on google searches? > > https://github.com/fabric8io/docker-maven-plugin > > > I guess try out the new one. > > Not much luck with the new one, so far: > https://github.com/fabric8io/docker-maven-plugin/issues/1739 > > The command it tries to run doesn't seem like one my docker recognizes. > > Does anyone else have a better maven docker plugin to try? >
Re: Is the karaf 4.4.4 docker image arm only?
> Steinar Bang : [snip!] > Or try out the, completely different, docker-maven-plugin that comes up > first on google searches? > https://github.com/fabric8io/docker-maven-plugin > I guess try out the new one. Not much luck with the new one, so far: https://github.com/fabric8io/docker-maven-plugin/issues/1739 The command it tries to run doesn't seem like one my docker recognizes. Does anyone else have a better maven docker plugin to try?
Re: Is the karaf 4.4.4 docker image arm only?
I just noticed that I'm using an archived and dead docker-maven-plugin https://github.com/steinarb/sonar-collector/blob/b0d6cedb35648df11ef1554b9fb8fbe669e94640/docker/pom.xml#L32 https://github.com/spotify/docker-maven-plugin?tab=readme-ov-file Archived on March 21 2022 and last commit from September 14 2021. I wonder what to do about that? Try the latest release of the dead docker-maven-plugin? Nah, that seems to be 1.2.2 (from January 15 2020), which I already have. Or try out the, completely different, docker-maven-plugin that comes up first on google searches? https://github.com/fabric8io/docker-maven-plugin I guess try out the new one.
Re: Is the karaf 4.4.4 docker image arm only?
FWIW The reason that I'm trying to update sonar-collector's docker image is that I discovered that sonar-collector actually has a user, and that user uses the docker image which suddenly stopped working: https://github.com/steinarb/sonar-collector/issues/5 The way I've created the docker image is that I've started with the official docker image and then have just added LATEST of sonar-collector's feature repository to karaf's boot repository list and then have added the PostgreSQL JDBC driver and sonar-collector itself to the list of boot features. The idea was to create one image that always pulled the latest sonar-collector from maven central. That works fine, I guess, until I start building for a newer Java version. I'm currently building and releasing on java 17, and the official karaf 4.4.4 image is running on java 11, so that might be a problem. Curiously the issue above isn't from Java version, it seems to be the OSGi version? My current sonar-collector docker image is based on the 4.2.8 official karaf image, which is OSGi 6 and Java 8. As I said I'm currently building for and with java 17 and OSGi 8. Surprisingly the error message seems to be related to running an OSGi 8 application on OSGi 6. It's surprising, because I would have thought binary incompatibility from using a newer version byte code would have stopped it before that...? Ah well, one step at a time. The current blocker is that when creating a new docker image on top of the official karaf 4.4.4 image, I keep getting arm64 docker images even though I'm running on amd64. And for the curious that has read this far: sonar-collector is a very simple application that is intended as a webhook to be called by sonarqube and/or sonarcloud, and for each call writes a row in a PostgreSQL database table with some key values from that analysis. It is intended for making long term statistics. The sonar-collector was created and used when maintaining a set of applications with, well, not so good numbers, to prove that for each iteration we made those applications slightly better instead of slightly worse. Sonarqube didn't offer an API to read out those statistics, and typing them in was a chore, writing a webhook was the suggestion made by sonarqube, so that's what I did.