APM Java Agent Docker Add command not extracting the ACC 22.1 tarball
Summary:
Docker Builder ADD for ACC 11.4 the ADD command extracted the ACC package.
In same setup, the only change was ACC 22.1, the ADD did not identify the file as archive file.
The Agent directory was not deployed. The JVM failing caused the app not to start.
The workaround was to change to copy and extract in the Dock Builder directory and copy over using Docker Copy command.
Now up and working.
Release : SAAS
Component : Integration with APM
Workaround was to change to copying and extracting in the Docker Builder directory and then copy over. Using Docker Copy command.
Unable to determine since customer did not preserve environment .
If having the issue, please provide:
docker build output, it will really helpful to see what is image and what is the output of each docker command.
docker version
docker info
dockerfile
Additional info from Engineering:
The image the customer is using is openjdk-11-slim. So I tried creating the build with the same openjdk image from docker hub and tried to reproduce it, but i can't reproduce there.
The only difference that is, the OpenJDK image that customer is using from their internal registry. So which i think could be docker image issue.
We have couple of workaround if some other customer may have same issue with their image.
1. Untarring the package locally and then use COPY command.
No manual effort.
2. COPY the image to the desired directly then USE the RUN command.
I have attached the sample Dockerfile, with the above two steps which explain the workaround.
===
FROM openjdk:11
RUN mkdir -p /root/AgentDep1
RUN mkdir -p /root/AgentDep2
#extract agent tar locally and then copy workaround 1
COPY wily /root/AgentDep1
#Or use RUN command like below workaround 2
COPY tomcat_appllication_agent_v1.
RUN cd /root/AgentDep2 && tar -xf tomcat_appllication_agent_v1.
#ADD tomcat_appllication_agent_v1.
==
Note: we need to use only one workaround.