Hi Zeyad,

My suggestion is to remove all the docker changes out of the PR.

You can create a jar file, war file or even a local docker image to test
your changes in your local dev using any of the binaries created after the
compilation.

You got a 401 error because you are trying to publish to a docker
repository that you don't have access.

For having a local docker image to test run:

./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test

The image created will be "fineract", change your docker compose to use it
(make sure not to pull the Apache Fineract docker hub image).

Again, remove all the changes related to docker or bmuschko plugin.

Please take a look at https://github.com/GoogleContainerTools/jib for
learning more about Jib.

Regards

Victor Romero

El mié, 26 jun 2024 a las 21:24, Zeyad Nasef (<zeyad.nasef....@gmail.com>)
escribió:

> Hello everyone, Hope you are doing well.
> I am working on creating a new custom API layer using Spring Web MVC
> related to this Jira ticket FINERACT-2021
> <https://issues.apache.org/jira/browse/FINERACT-2021>.
>
> Now, I added the following changes for building and publishing a custom
> image on my docker hub account using `bmuschko` plugin:
>
> ```
> tasks.create("dockerCreateDockerfile", Dockerfile) {
>     from("azul/zulu-openjdk-alpine:21.0.3-jre")
>     label(["maintainer": "Zeyad Nasef <zeyad.nasef....@gmail.com>"])
>     instruction 'RUN apk add --no-cache msttcorefonts-installer fontconfig'
>     instruction 'RUN update-ms-fonts'
> }
>
> task dockerBuildImage(type: DockerBuildImage) {
>     images.add('zeyad2003/fineract-base:latest')
>
>     dependsOn dockerCreateDockerfile
> }
>
> task dockerPushImage(type: DockerPushImage) {
>     images.add('zeyad2003/fineract-base:latest')
>
>     dependsOn dockerBuildImage
> }
> ```
>
> Now that was the only way that I could run and see my changes through.
> But the following comment
> <https://github.com/apache/fineract/pull/3915#discussion_r1654404951>
>  said:
>
> >> just create the custom Fineract image deriving from a publicly
> available base image (like the default Fineract image; look into
> fineract-provider).
>
> But I couldn't understand how to do it, I tried to run the
> `:custom:docker:jib` task and it gave me an unauthorized error (401).
>
>
> *So could anyone help to run these changes with docker and docker-compose?*
> Thanks!
>

Reply via email to