1

What is the difference between the buildah subcommand run and unshare? The documentation doesn't exactly say how buildah unshare is modifying the user namespace? And I'm confused what exaclty that means.

buildah help run

Runs a specified command using the container's root filesystem as a root filesystem, using configuration settings inherited from the container's image or as specified using previous calls to the config command.

buildah help unshare

Runs a command in a modified user namespace.

Evan Carroll
  • 28,578
  • 45
  • 164
  • 290

1 Answers1

2

buildah run executes a command inside of a container on the image. Similar to the RUN command inside of a Dockerfile.

buildah unshare sets up the default user namespace for doing builds, but does not do anything with containers or images. When you are in buildah unshare you are just a normal process on your homedir. Not in a container.

rhatdan
  • 271
  • 1
  • 3