我正在尝试复制并提炼将 .tar 文件的内容复制到 minikube 容器中,复制部分工作正常,但提取部分工作正常:
部署.yaml
volumeMounts:
- mountPath: /opt/jboss/keycloak/themes/my_custom_theme
name: shared-volume
initContainers:
- name: init-customtheme
image: busybox:1.28
command: ['sh', '-c', 'cp -rL /CustomTheme/custom_theme.tar /shared && tar -xvf /shared/custom_theme.tar']
volumeMounts:
- mountPath: /shared
name: shared-volume
- mountPath: /CustomTheme
name: theme-volume
volumes:
- name: shared-volume
emptyDir: {}
- name: theme-volume
configMap:
name: customthemes-configmap
相关部分是这样的:
command: ['sh', '-c', 'cp -rL /CustomTheme/custom_theme.tar /shared && tar -xvf /shared/custom_theme.tar']
有谁知道为什么我无法提取文件内容?