Fewbytes / rubber-docker

A workshop on Linux containers: Rebuild Docker from Scratch
MIT License
2.99k stars 237 forks source link

breakout.py inside ubuntu.tar image is broken #37

Closed natict closed 6 years ago

natict commented 6 years ago

Fixing this will allow attendees to skip downloading breakout.py from github

natict commented 6 years ago

Seems like docker export generates a corrupted tar image:

# tar Wrf ubuntu.tar breakout.py
tar: .dockerenv: Warning: Cannot stat: No such file or directory
tar: bin: Warning: Cannot stat: No such file or directory
tar: bin/bash: Warning: Cannot stat: No such file or directory
...
tar: var/spool/plymouth: Warning: Cannot stat: No such file or directory
tar: var/spool/rsyslog: Warning: Cannot stat: No such file or directory
tar: var/tmp: Warning: Cannot stat: No such file or directory
breakout.py: Contents differ
tar: A lone zero block at 856136
tar: VERIFY FAILURE: 1 invalid header detected
tar: Exiting with failure status due to previous errors

There seems to be an open issue in the moby repo (which refers to a golang issue). A workaround is to create a clean tar from breakout.py, and append to it the tar exported from docker.