• 11

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Docker daemon can't import tar with duplicate files

I've been following this tutorial to create a docker image from a buildroot environment: https://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/

Basically, the steps are:

  1. Create the rootfs.tar as you would any other x86_64 buildroot environment
  2. Create a filesystem overlay for the files:

    (a) /etc/resolv.conf and /sbin/init by touching

    (b) /lib/x86_64-linux-gnu/libpthread.so.0, /lib/x86_64-linux-gnu/libc.so.6, and /lib64/ld-linux-x86-64.so.2 by cping from the local filesystem

  3. tar r the files (iow, append) to rootfs.tar to create fixup.tar

  4. docker import - tag < fixup.tar

However, when I attempt to import this, docker returns:

Error response from daemon: Untar re-exec error: duplicates of file paths not supported: output:

I presume this is because tar r appends rather than replaces files, so tar has multiple indexes for the same file and this causes docker to be confused.

I looked around, but I couldn't find a newer version of this tutorial.

How does one go about correcting this so that I can create a docker image from a buildroot environment?

      • 2
    • Incidentally, I opted out of creating the buildroot tag, but I'm equally surprised that it doesn't exist. Anyone with more rep have any idea if this appropriate for a new tag?
      • 1
    • Did you try just "tar -x" to "collapse" the appended files and then using "tar -c" to create your tar for importing into docker?
    • Yes. It has issues with mknod creating special files. May need fakeroot. There has to be an easier way!

Trending Tags