Skip to content

feat: Adds settings.xml to java-base - #3

Open
FritzOnFire wants to merge 11 commits into
masterfrom
goto-fz-java
Open

feat: Adds settings.xml to java-base#3
FritzOnFire wants to merge 11 commits into
masterfrom
goto-fz-java

Conversation

@FritzOnFire

@FritzOnFire FritzOnFire commented Feb 10, 2020

Copy link
Copy Markdown
Contributor

Doing this allows us to only add this file once, and not in every dockerization of each java service.

The passwords are added using Jenkins. eg http://cimaster01:8080/job/java-base/configure.

Refs: ASG-4511

@frankvanrietimqs frankvanrietimqs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fritz I'm not suer why we

Comment thread java/8/Dockerfile
&& apt-get install openjdk-8-jre -y
RUN apt update && \
apt install -y \
openjdk-8-jdk \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need JDK? We won't be developing on top of this image?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR: its adds 10mb to the image.

The idea is that the jar file gets created using this docker image. We do this with all our other services. It dramatically reduces the build job setups.

Comment thread java/8/Dockerfile
ARG Maven_Snapshots_Deployment
ARG Maven_Github_gerhardvanwyk
RUN mkdir -p /root/.m2
RUN echo "<settings> \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I don't think we need to be able to build in this container. Having said that:
So every image and therefore every project will have its own maven repository. This means that we will have a massive amount of duplication of the many shared libraries. It also means that it becomes awkward if you want to build locally using chnages pushed to your local .m2 folder?

Maybe I'm missing what you are trying to do?

We took this approach on our side: https://github.com/IMQS/imqs-wip-service/blob/team-asset-containers/build.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm... so two parts

  1. What I was trying to do with including the settings file in the base images is affectingly addressing the issues that the build.sh is bringing up in the start of the file. This keeps everything contained and self sustained. There is no dependency on the machine building the jar because everything is all ready setup inside the container.

  2. Crap... making changes in your local .m2 folder... thats a good point... as rare as this case may be, It will still be very annoying the day that someone wants to do something like this... The only solution I can think of is doing the same thing that we do for maps, and that is to build the base image with your changes your self. I could add a second dockerfile that copys your local .m2 into the container to streamline this process?

@FritzOnFire

Copy link
Copy Markdown
Contributor Author

@frankvanrietimqs I have added a second dockerfile and a script to use it. This should satisfy the desire to be able to test a service in docker with changes to local .m2 folder

@FritzOnFire

Copy link
Copy Markdown
Contributor Author

@frankvanrietimqs do you mind if I just merge this?

@FritzOnFire FritzOnFire changed the title Adds settings.xml to java-base feat: Adds settings.xml to java-base Apr 10, 2025
@FritzOnFire
FritzOnFire requested review from itgingerninja and removed request for bmharper April 10, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants