docker – Kubernetes – Eclipse-temurin:17 – java problem

I am bulding a docker image from dockerfile:

FROM eclipse-temurin:17-jammy
RUN apt update && \
    apt-get install -y emacs-nox net-tools netcat vim

ENTRYPOINT ["/bin/bash", "-c", "/opt/tak/configureInDocker.sh init"]

When i start container from the image on my localhost docker engine and “exec” into docker container i have JAVA installed and everything is OK.

But when i start my k8s pod from this image there is no JAVA installed in my container. The image is build from eclipse-temurin so the JAVA should be installed.
This is my pod.yml file:

    
apiVersion: apps/v1
kind: Deployment 
metadata: 
  name: server-deployment
spec: 
  replicas: 1
  selector:
    matchLabels:
      app: server
  strategy:
    type: Recreate
  template:  
    metadata: 
      labels: 
        app: server
    spec:
      containers: # List
        - name: server
          image: containersimageformyserver.azurecr.io/images/server:RELEASE-12
          ports: 
            - containerPort: 8443
          volumeMounts:
          - name: server-persistent-storage
            mountPath: /opt
      volumes:
      - name: server-persistent-storage
        persistentVolumeClaim:
          claimName: my-server-azurefile
       

I checked file digest of image and I am sure that i use the same image locally and on Kubernetes.

Read more here: Source link