Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl is not installed in jnlp agent based image #153

Closed
vutkin opened this issue Aug 28, 2020 · 14 comments · Fixed by #321
Closed

curl is not installed in jnlp agent based image #153

vutkin opened this issue Aug 28, 2020 · 14 comments · Fixed by #321
Labels

Comments

@vutkin
Copy link

vutkin commented Aug 28, 2020

Hi all,

could you please explain why did you delete curl from based image:

https://github.com/jenkinsci/docker-agent/blob/master/8/alpine/Dockerfile#L45

It's better to have git/curl in jnlp images.

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Aug 28, 2020

could you please explain why did you delete curl from based image:

The line was added 4 years ago by @carlossg when alpine agents were enabled. I believe the general pattern is to include only the required components in an agent image. Fewer components means fewer chances for issues with components.

Command line git is bundled with the agent images because it is the preferred SCM system for the majority of Jenkins users.

@timja timja closed this as completed Aug 3, 2021
@nikoooo20
Copy link

I hope you reconsider to install curl back to the image. Our Jenkins library uses curl a lot to integrate job states to the git.

If curl installation is not possible, then I ask you to provide workaround to install it.

@MarkEWaite
Copy link
Contributor

If curl installation is not possible, then I ask you to provide workaround to install it.

Create your own Docker image that is derived from this image. Install the tools that you need in the derived docker image. Use the Docker image you created.

@bjrke
Copy link

bjrke commented Apr 12, 2022

In the jenkins documentation it is suggested to use curl, wget or jq instead of complex groovy code:
https://www.jenkins.io/doc/book/pipeline/pipeline-best-practices/#avoiding-complex-groovy-code-in-pipelines

I would say extending a docker container is much more complex (because of maintenance overhead) then writing some "complex" groovy code.

@sameer1046
Copy link

I would suggest not to remove curl in the agent

@danielwegener
Copy link

This essentially breaks custom tool installation/download for us for tools that are NOT hosted as archive but static binaries (like many releases on github).

@sameer1046
Copy link

Pls add necessary command line tool curl

@gregoryboue
Copy link

Any news on this ?

@MarkEWaite
Copy link
Contributor

Any news on this ?

We don't plan to add curl to the agent image. If you need curl installed on your agent image, you should create a custom agent image with the tools that you need (including curl). See my comment at #153 (comment) and see the link from @timja at #253 (comment)

@gounthar
Copy link
Contributor

gounthar commented Nov 9, 2022

If you need help creating and hosting your docker agent-based image containing curl, we could try to pair one of these days.
I'm not skilled, but I've done it several times.

@dduportal dduportal reopened this Nov 12, 2022
@dduportal
Copy link
Contributor

Reopening as discussed by maintainers in IRC: the value of adding curl is still high given the (small) overhead it had.

Besides, curl is used in the image during the build process to retrieve the remoting JAR file and is then deleted.

Please note that wget won't be an option as curl has the same feature set.

@dduportal dduportal mentioned this issue Nov 12, 2022
6 tasks
@dduportal
Copy link
Contributor

#321

@dduportal
Copy link
Contributor

(Wait for the release to be availble: I'll comment here)

@n00bdevel0per
Copy link

Will this work on fargate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.