Code Monkey home page Code Monkey logo

Comments (10)

carlossg avatar carlossg commented on June 16, 2024 10

I'd rather not add ssh given that none of the upstream jdk images include it.
That said, if enough people vote for this issue (with 👍 reactions at the top) I would accept a PR for it

from docker-maven.

MartinMeinhold avatar MartinMeinhold commented on June 16, 2024 5

I'd rather not add ssh given that none of the upstream jdk images include it.

Out of curiosity: what's the reason for the negative sentiment towards shipping the native ssh client?

I think I understand why the upstream image doesn't want to ship it, mostly likely due to different use cases of a plain Java image. Maven on the other side seems to always having to interact with external systems one way or another and providing a CLI that works with most VCS systems out of the box seems like a reasonable idea to me.

from docker-maven.

GauthierPLM avatar GauthierPLM commented on June 16, 2024 3

I agree with @MartinMeinhold: maven integrates VCS support via various plugins, most famously the Maven Release plugin, which is a core maven plugin.

This change between Maven 3.8 and 3.9 images means many build pipeline will be broken as the release plugin won't be working anymore if SSH was used to push back commits (this is how I discovered this change). Meanwhile, it's not mentioned anywhere and up to user to discover that this image is no longer supporting git over SSH.

While it makes sense that a JDK image does not include SSH (since it's usually not needed), not having it in a build tool natively supporting VCS using SSH (most notably Git) feel much more surprising.

from docker-maven.

seanmmills avatar seanmmills commented on June 16, 2024 1

Ah okay, makes more sense now. I purged my images and see the same now. Updating hundreds of projects to use jgit is not feasible for our development teams. We'd be forced to maintain our own maven images which is something I like to avoid. Would you consider a PR if I were to add ssh to all the Dockerfiles and resolve any tests?

from docker-maven.

carlossg avatar carlossg commented on June 16, 2024

this is documented in https://github.com/carlossg/docker-maven#installed-packages

from docker-maven.

seanmmills avatar seanmmills commented on June 16, 2024

this is documented in https://github.com/carlossg/docker-maven#installed-packages

I saw that, but even the 2 images with it documented as having ssh, don't have it any longer. Since the prepare phase of the maven-release-plugin requires it, shouldn't the Dockerfiles be updated to install it?

The only image with ssh installed is the first one in the console snippet below.

M635295~(:|✔) % docker run -it --rm --entrypoint=/bin/bash maven:3.8-eclipse-temurin-17

root@9c611061e743:/# which ssh
/usr/bin/ssh
root@9c611061e743:/# exit
exit
M635295~(:|✔) % docker run -it --rm --entrypoint=/bin/bash maven:3-eclipse-temurin-17  

root@d2a96dddc94b:/# which ssh
root@d2a96dddc94b:/# exit
exit
M635295~(:|✔) % docker run -it --rm --entrypoint=/bin/bash maven:3-eclipse-temurin-20  

root@98a75e977a70:/# which ssh
root@98a75e977a70:/# exit
exit
M635295~(:|✔) % docker run -it --rm --entrypoint=/bin/bash maven:3-eclipse-temurin-19

root@690138b501db:/# which ssh
root@690138b501db:/# exit
exit
M635295~(:|✔) % 

from docker-maven.

carlossg avatar carlossg commented on June 16, 2024

you have outdated images cached

❯ docker run -it --rm --entrypoint=/bin/bash maven:3.8-eclipse-temurin-17 ssh -V
Unable to find image 'maven:3.8-eclipse-temurin-17' locally
3.8-eclipse-temurin-17: Pulling from library/maven
10ac4908093d: Already exists
6df15e605e38: Already exists
2db012dd504c: Pull complete
8fa912900627: Pull complete
ec28444188f6: Pull complete
b09ac0d3a787: Pull complete
89710259c749: Pull complete
41a53e760871: Pull complete
Digest: sha256:76789e7bf6713b7fe617b0e72ccf1e0cc23425bc41610c878f13a9b2ffd2127d
Status: Downloaded newer image for maven:3.8-eclipse-temurin-17
/usr/bin/ssh: /usr/bin/ssh: cannot execute binary file

I've noticed that there was a problem with the tests and ssh is not installed in any image, fixed in #380
My guess is that upstream images removed it at some point

from docker-maven.

carlossg avatar carlossg commented on June 16, 2024

Since the prepare phase of the maven-release-plugin requires it

only if you use git over ssh with native implementation, there is also the java implementation
https://maven.apache.org/scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/index.html

from docker-maven.

timothystone avatar timothystone commented on June 16, 2024

Any updates on this? Seems like a legitimate need for expected compatibility of core Maven plugins.

Maybe jgit is a workaround, but it can be troublesome in numerous edge cases. Seems I recall GPG signing was a problem in the past. It would be good for the project to have an official "Yay" or "Nay" on resolution of this issue. I see the documentation and the note "that upstream images removed it at some point."

I'm not adverse to maintaining my own image, but some organizations are not equipped.

from docker-maven.

timothystone avatar timothystone commented on June 16, 2024

Would you consider a PR if I were to add ssh to all the Dockerfiles and resolve any tests?

OSS invites PRs @seanmmills. I suggest forking and opening the PR to solicit comments from the maintainers. No harm is done. Others can pull from your work should the maintainers opt out of the need.

There’s a strong argument for maintaining bespoke images as an organization if needs are not met by the publicly available project. This is not always possible depending in the organization’s access or desire to maintain and secure registries, i.e., Artifactory/Nexus/DockerHub/GitHub

I see the position many take with core Maven plugins need of ssh and agree a Maven image should tack toward tooling in support of said plugins, though I will defer to the maintainers if there is an explicit project goal being met.

from docker-maven.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.