carlossg / docker-maven

Official Docker image with Maven
Apache License 2.0
524 stars 423 forks source link

Include ssh client on Temurin distributions #340

Closed jonesbusy closed 1 year ago

jonesbusy commented 1 year ago

Fix https://github.com/carlossg/docker-maven/issues/339

I will argue is a common use case when using maven release plugin and GIT_SSH_COMMAND env var to configure SSH option.

carlossg commented 1 year ago

sorry but I am keeping these images to the bare minimum included by upstream and needed to run maven

mbenson commented 1 year ago

In light of the last comment by @carlossg it's confusing why this PR and the associated issue remain open. I would add my voice to the chorus of users missing ssh from the latest images, but in any case if you've irrevocably decided not to support mvn release against git with the official (temurin) image (do other flavors still include ssh? How even more confusing), properly close these workflow items and let us get to working around the problem. Leaving them open just creates false(?) hope.

I suppose it's a completely other WTF issue why Maven's git support is apparently relying on system executables instead of a Java client library.

mbenson commented 1 year ago

On the git impl subject, I have found out from some of the Maven devs that https://maven.apache.org/scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/ exists FWIW. Still it would be nice to support the default here.

tdspencer3 commented 1 year ago

I would also like to voice my frustration that ssh is no longer included by default. We have used the maven images this way for years to automate maven releases and this is now broken as of 3.9 causing us to have to roll back to 3.8. I am looking into some suggested workarounds, but this could all be easily avoided for us if this PR was accepted and kept this functionality working as it had been.

carlossg commented 1 year ago

ssh has never installed as part of this image so it was not removed. It must have been removed by the parent images, either eclipse-temurin:11-jdk-focal or its parent, so you probably can check with those images why it was removed or if it can be put back. I don't think it should be added here as these images are supposed to have the bare minimum, and different people ask for different packages

jonesbusy commented 1 year ago

Not asking for "random" package. But the bare minimum for maven release to work with default configuration.

carlossg commented 1 year ago

I have added a table with packages installed in each image https://github.com/carlossg/docker-maven#installed-packages

as you can see ssh is not included in most variants

If you feel that ssh is important and shouldn't have been removed you can bring that up with the eclipse-temurin maintainers.

carlossg commented 1 year ago

FWIW eclipse-temurin-19 does have ssh installed

youptech commented 1 year ago

@carlossg it doesn't have ssh installed (anymore?) But I found another way around. Install ssh, as it is available through the package manager. In my pipelines for deploy, I just add the next line before the first call to ssh: apt-get update && apt-get install -y --no-install-recommends openssh-client