0

I've noticed that my tar.gz files that are getting uploaded have files inside them that have truncated filenames. When I view the build log, the files are getting written with the full filename (same outcome when building locally). The files are then copied out with docker cp into a tar file, gzipped, and uploaded to a server. If I download the artifact from the server, the filenames of long files have been truncated at right around 100 characters long, including path (eg, files in the js folder end up being 1 character longer than files in the css folder).

Is this a docker issue, or could docker be using a bad tar library? What can I do to work around this without changing the filenames?

Buns of Aluminum
  • 2,439
  • 3
  • 26
  • 44

1 Answers1

0

If the container includes tar try

docker exec container_id tar -C /path/to/tar -cf - . > local.tar
Matt
  • 68,711
  • 7
  • 155
  • 158
  • `local.tar.gz` ends up not being able to be unarchived when I do this. However, I did notice that the `tar` being used in the container is from busybox, which does seem to have the limitation of 100 characters for the filenames. – Buns of Aluminum Aug 21 '20 at 04:31
  • Probably compression then... `cf` will just dump the `tar` – Matt Aug 23 '20 at 04:32
  • and yeah it looks likes busy box creates ustar formatted files, so 155 character prefix and 100 character file names. – Matt Aug 23 '20 at 05:53