I am trying to deploy a springboot application in openshift environment. The deployment is finished but the pod is going into "CrashLoopBackOff" error.
Found the access error from the pod logs.
Error: Unable to access jarfile tes.jarDockerfile:
FROM openjdk:8-jre-alpine
WORKDIR /app/tes
ADD BUILD_FILE/tes.jar /app/tes
# Install below packages to get system resource
RUN echo "http://dl-1.alpinelinux.org/alpine/v3.9/main" >> /etc/apk/repositories
RUN echo "http://dl-2.alpinelinux.org/alpine/v3.9/main" >> /etc/apk/repositories
RUN echo "http://dl-3.alpinelinux.org/alpine/v3.9/main" >> /etc/apk/repositories
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.9/main" >> /etc/apk/repositories
RUN echo "http://dl-5.alpinelinux.org/alpine/v3.9/main" >> /etc/apk/repositories
FROM openjdk:8-jre-slim
RUN apt-get update -y; \
apt-get install -y --no-install-recommends iproute2 procps sysstat dumb-init bash coreutils sed; \
rm -rf /var/lib/apt/lists/*
# Make port 8012 available to the world outside this container
EXPOSE 8012
# Define environment variable
ENV NAME tes
# Run .jar file
ENTRYPOINT ["java", "-jar", "tes.jar"]I have applied the "anyuid" policy for the namespace,
oc adm policy add-scc-to-user anyuid -z default -n <namespace>and set the selinux to permissive,
sudo setenforce permissiveBoth of them does not work. Please let me know what is blocking the deployment to access the tar file.