seguente riga nel Dockerfile non funziona: messaggioCome utilizzare i pipe (ioredirection) in Dockerfile RUN?
RUN git archive master | tar -x -C /path
Errore:
fatal: Not a valid object name
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Come risolvere questo problema?
Che ne dici della seguente variante: 'git archive master | tar xf - -C/path'? E se fallisce, puoi verificare che 'git archive' funzioni effettivamente come ti aspetti da qualcosa come' git archive master --output =/tmp/path.tar'? –
Ho provato le soluzioni di VonC, non riesco ancora a usare le pipe in Dockerfile RUN. Sembra che Dockerfile non stia andando bene in questo. Usando git archive --output su un file tar, e quindi "tar -xf /path/to/file.tar -C/path/to/extract" è un modo per ovviare a questo problema. –
Convertirò il mio commento in risposta - per favore segna come accettato. –