Linux Transform Troubleshooting
1. Jenkins app may fail to launch after containerization.
- This issue is specific to jenkins on RHEL based images where “dejavu-sans-fonts“ package is missing in container base image.
- Reference Link: https://wiki.jenkins.io/display/JENKINS/Jenkins+got+java.awt.headless+problem
- Edit the Dockerfile and add below command after LABEL clause to preinstall this package in Dockerfile and build the container image.
RUN curl http://mirror.centos.org/centos/7/os/x86_64/Packages/fontpackages-filesystem-1.44-8.el7.noarch.rpm -o fontpackages-filesystem-1.44-8.el7.noarch.rpm && \
curl http://mirror.centos.org/centos/7/os/x86_64/Packages/dejavu-fonts-common-2.33-6.el7.noarch.rpm -o dejavu-fonts-common-2.33-6.el7.noarch.rpm && \
curl http://mirror.centos.org/altarch/7/os/aarch64/Packages/dejavu-sans-fonts-2.33-6.el7.noarch.rpm -o dejavu-sans-fonts-2.33-6.el7.noarch.rpm && \
rpm -ivh fontpackages-filesystem-1.44-8.el7.noarch.rpm dejavu-fonts-common-2.33-6.el7.noarch.rpm dejavu-sans-fonts-2.33-6.el7.noarch.rpm
- Note: Above RUN command is prepared for CentOS7 or RHEL7 base image. If the base image is different, you have to add correct mirror links for specific RPM source and package names in rpm command.
2. Docker image creation failed due an error "layer does not exist"
The following error is thrown if Native Overlay Diff is set as false in linux kernel.
Step 15/20 : COPY chcmd autoMove.* /opt/
failed to export image: failed to create image: failed to get layer sha256:410208ed2e84cb4113e0ef0533dd309e8a929c27caf10d8af1d570e15bfd52da: layer does not exist
In order to get rid of the above error, please run the following command as root.
modprobe -r overlay && modprobe overlay redirect_dir=on && systemctl restart docker
To verify whether the command has the appropriate effect, please run the following command
docker info | grep Diff
Native Overlay Diff: true