Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Use BSDtar instead of tar? Tar has some issues inside of docker #106

Closed
paulcdejean opened this issue Oct 19, 2018 · 4 comments
Closed

Use BSDtar instead of tar? Tar has some issues inside of docker #106

paulcdejean opened this issue Oct 19, 2018 · 4 comments

Comments

@paulcdejean
Copy link

Tar sometimes throws weird errors if /tmp/ isn't inside a volume. This is due to overlayfs. If you have a large docker image you're likely to tar errors.

See: coreos/bugs#1095

Apparently BSDtar doesn't have issues in overlay FS to the same degree.

Just a thought.

@nurmi
Copy link
Member

nurmi commented Oct 21, 2018

Hi @paulcdejean - thanks for reaching out on this. Our current recommendation is indeed to use an external volume to avoid these tar/Linux/overlay interaction problems, you’ll find some other issues here discussing the issue and workarounds! Unfortunately, since we use some of the options of gnu tar that don’t exist in bsdtar, it isn’t a straightforward replacement, and python2 tarfile implementation also had some incompatibilities with various docker tar formats as well. Now that we’re porting to python3, I think an ideal situation would be to try and use python native tarfile across the board (this will take some investigation and work, but possible that py3 tarfile has resolved the problems we had with py2 tarfile!). I’ll keep this ticket open pending discussion and investigations moving forward.

Best
Dan

@paulcdejean
Copy link
Author

paulcdejean commented Oct 21, 2018 via email

@nurmi
Copy link
Member

nurmi commented Oct 22, 2018

We wanted to try to keep external dependencies limited (this particular bug isn't always triggered, e.g. other docker storage drivers in use, or the kernel fix is in place!). Since overlay is the default in many distros now however, I think it would be good to include the volume/config setup in our examples (scripts/docker-compose/*).

@zhill
Copy link
Member

zhill commented Mar 17, 2020

Closing this out since very old and we use the external vol in the docker-compose default as well as helm charts for Anchore now. If any new tar-related issues arise they should be tracked in their own issues.

@zhill zhill closed this as completed Mar 17, 2020
mfilser added a commit to mfilser/wekan that referenced this issue Jun 11, 2021
- libarchive-tools contains bsdtar. bsdtar is needed for meteor
  installation, it doesn't / or didn't work with docker and overlayfs.

  see also here:

  jshimko/meteor-launchpad#39
  anchore/anchore-engine#106
  coreos/bugs#1095
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants