I can build an image for a tools.jar using the follow steps:
#Base docker image for custom jdk tools.jar
FROM alpine:latest
#COPY the custom jdk tools.jar path appended with customJdkTools/vendor/vmName/version/tools.jar to the path “/opt/caapm/agent”
COPY ./customJdkTools /opt/caapm/agent
# Dummy CMD to active the container
CMD ["tail","-f","/dev/null"]
But how can I assign this image to a particular container running a particular app?
Containers run from images so this image cannot be attached to a running container but will run as a standalone container. You cannot assign a container/image to an already running container.