Welcome to the new Linux Foundation Forum!

Chapter 7 - Container Operations, Creating the rootfs

Hi,

There's a little issue with the commands above, exactly using the docker export command
$ docker export
$ (sudo docker create busybox) > /tmp/busybox.tar
$ mkdir -p ~/myrunccontainer/rootfs
$ tar -C ~/myrunccontainer/rootfs -xf /tmp/busybox.tar
$ cd ~/myrunccontainer/rootfs
$ ls
bin dev etc home proc root sys tmp usr var

Must be in a single line, the proper syntax below:

$ docker export $(sudo docker create busybox) > /tmp/busybox.tar
$ mkdir -p ~/myrunccontainer/rootfs
$ tar -C ~/myrunccontainer/rootfs -xf /tmp/busybox.tar
$ cd ~/myrunccontainer/rootfs
$ ls
bin dev etc home proc root sys tmp usr var

Thanks.

Sign In or Register to comment.