Welcome to the 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.

Comments

  • AlexeyBY
    AlexeyBY Posts: 56
    edited February 2020

    Thank you !
    There are a lot of mistakes in the lab guide.

Categories

Upcoming Training