0

And:

For an common real situation: I want use maven in Pod ( jenkins k8s plugin ).

The image java contains jdk, And image maven contains maven only which mean no jdk in it.

Question: Without copy file by share volume, Can you stack container files ( like docker build process ), or access files in another container ?

Reason: If I use many different java version and both oracle / openjdk, I may be need create more then 100 combination with maven 3.6~3.8.
And if there are somthing more need stack over java & maven things will lose controll very fast.

apiVersion: v1
kind: Pod
spec:
  containers:
  - name: java
    image: xxxxxx/library/java-jdk:17.0.5
  - name: maven
    image: xxxxx/library/maven:3.8.6
Alceatraz
  • 432
  • 1
  • 3
  • 13
  • Like in plain Docker, you cannot combine images in a single container or pod. (Consider the case of Debian- and Alpine-based images, that have different system C library implementations; what should the merged `/lib/libc.so.6` be?) The [Docker Hub `maven` image](https://hub.docker.com/_/maven) _does_ include a JVM, but conversely, you probably only need it during your image build stage and not in your runtime (I'd be very surprised to see either a bare Maven or JVM image in a Kubernetes manifest). – David Maze Nov 03 '22 at 10:55

0 Answers0