Official Docker images
See original GitHub issueCredit
This request was originally raised by @eyalkoren and credit for the suggestion goes to him. 😃
Overview
There are cases in which it makes sense to have an official Docker image for the APM Java agent. This is a proposal for the creation of such an image and for its deployment as a part of the build and release process for the APM Java Agent.
Use cases
One use case which has been well-outlined by @eyalkoren in a separate document is for a standalone agent container as a part of a K8S cluster. As a pod starts, an agent container can be configured as an init container for the pod. In doing so, the APM agent would start up prior to the application(s) in the pod and be available for instrumentation by application containers through the use of the JAVA_TOOL_OPTIONS
environment variable.
I’m sure there are likely other use cases for this or the above case can be expanded upon, but I’ll let @eyalkoren extend what I’ve written above as he sees fit. 😃
Current Build Process
Currently, the build process for the Java APM agent is outlined here.
As one can see, there is currently no mention of an official container being built, nor does the repo currently contain a Dockerfile
with which to build one.
Proposed Changes
This request is a collection of a few concrete changes:
1. Official Dockerfile
Obviously, the build process will need a Dockerfile in the repository. @eyalkoren has kindly provided a basic sample which could get us started by checking it directly into the root of the repository.
Alternatives
The above is simple enough that I assume we can just check it in directly instead of making it a part of the build process to create it dynamically. However, I’ll mention that as an alternative here just in case the team thinks this might be a worthwhile area of exploration.
2. Official Docker image
Right now, there is no observability
namespace in our Docker repository, which we would likely want in order to host these images. If we agree that creating Docker images for the APM Java Agent is a worthwhile endeavor, I will reach out to the appropriate folks to make this happen.
3. Build process
Right now, we use an internal CI server as a part of the release process. We propose modifying that pipeline to create an image as an artifact which can be automatically pushed up to Docker Hub once the requirements in step 2 are in place.
Questions
Snapshots?
We could, in theory, create nightly image snapshots as Docker images and make them available as well. My guess is that with a simple Docker file, anybody who wants an image could just clone the repository and build one themselves but if this is something people are interested in, it’s worth discussing.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (5 by maintainers)
Top GitHub Comments
We now have official Docker images displayed on the registry web page, thanks to https://github.com/elastic/infra/issues/17508
@eyalkoren As you can see by the issue above, we are waiting on the infra folks to help resolve an issue with authentication to the registry. I’ll update this issue when I know more.