busybox:1.28イメージを使用してtar -xvfを実行します。

busybox:1.28イメージを使用してtar -xvfを実行します。

コピーして書こうとしています。タブレット.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']

なぜファイルの内容を抽出できないのかご存知ですか?

ベストアンサー1

おすすめ記事