-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Usage: is "java -jar /usr/share/jenkins/agent.jar" up to date? #745
Comments
I'm not able to duplicate the problem that you're describing. I ran the example command from the usage page as: docker run -i --rm --name agent --init jenkins/agent java -jar /usr/share/jenkins/agent.jar That started a Jenkins agent with the message
The agent container is a building block for other containers like the inbound agent container. Can you provide more details so that others can duplicate the issue? |
I'm at I use
As I wrote, the
Therefore my conclusion was, that the error is caused by that Dockerfile So, let me aslk, do you really use the Dockerfile of that tag? Edit: |
I thing your confusion comes from the fact you're reading the agent readme, while the entrypoint you linked from the Dockerfile concerns the inbound agent, which is build from the same Dockerfile as another target. |
Not sure, if there is confusion on my side. As I wrote: Anyway, if you don't get this error, even if you build with the current dev Dockerfile, then it may be an issue on my side, which I was able to solve simply by inspecting the Dockerfile and act according the docker documentation. |
I didn't need to build anything with the current dev Dockerfile because the container image is already published by hub.docker.com. I confirmed that the instructions for the published container image work as expected when I run:
They also run as expected when I run
|
Maybe you need to build it on your own to see the errors ;-). |
That's the difference, if you build the container local from the current Dockerfile or pull it with "jenkins/agent:latest-bookworm-jdk17" from docker.
(first from docker, second form local build) |
I built the container locally from the master branch plus one commit for #746. The way I built the containers locally was:
I confirmed that there was a local container image and that local container image included:
When I run one of those local container images with the command:
The output looks like this:
Maybe you and I are building the container images differently? |
What's the exact command you used to build your image? Without specifying any To build the agent with See also https://docs.docker.com/build/building/multi-stage/ |
Though I only need one agent for debian/jdk17, I run docker in the root folder with
In my first comment I included a link to exactly that Dockerfile. Sorry, and excuse my questions. (Edit: using "--target agent" or, even better ;-), pull the container is the solution.) |
Thanks for the clarification @boaks . The build process for this repository is of necessity more complicated than the typical build processes because we build for multiple platforms, multiple Java versions, and multiple output targets. We want to keep the common code in a single location and that has made the build of a single image more complicated. The available configurations can be listed with |
No worry, on the contrary thanks for opening this issue! It underlines the fact that we should create a CONTRIBUTING or a HACKING documentation to clarify how to build the different images of this repository as since #570 it's a bit less simple and could be confusing. |
Describe your use-case which is not covered by existing documentation.
Using a debian image build with Dockerfile according the documented usage
results in
As far as I understand that Dockerfile
already starts the agent. And leaving out
java -jar /usr/share/jenkins/agent.jar
seems to "work on my machine".Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.
usage
Are you interested in contributing to the documentation?
No response
The text was updated successfully, but these errors were encountered: