diff --git a/internal/app/wwctl/container/exec/root.go b/internal/app/wwctl/container/exec/root.go index 0b6aaf63..bcb8cf5a 100644 --- a/internal/app/wwctl/container/exec/root.go +++ b/internal/app/wwctl/container/exec/root.go @@ -32,11 +32,10 @@ var ( func init() { baseCmd.AddCommand(child.GetCommand()) - baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, `Bind a local path which must exist into the container. Syntax is -source[:destination[:{ro|cow}]] If destination is not set, -it will the same path as source.The additional parameter is -ro for read only and cow, which means the file is copied into -the container and removed if not modified.`) + baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, `source[:destination[:{ro|cow}]] +Bind a local path which must exist into the container. If destination is not +set, uses the same path as source. "ro" binds read-only. "cow" temporarily +copies the file into the container.`) baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to container") baseCmd.PersistentFlags().StringVarP(&nodeName, "node", "n", "", "Create a read only view of the container for the given node") } diff --git a/internal/app/wwctl/container/shell/root.go b/internal/app/wwctl/container/shell/root.go index 52d9825d..df9b2c6e 100644 --- a/internal/app/wwctl/container/shell/root.go +++ b/internal/app/wwctl/container/shell/root.go @@ -28,11 +28,10 @@ var ( ) func init() { - baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, `Bind a local path which must exist into the container. Syntax is -source[:destination[:{ro|cow}]] If destination is not set, -it will the same path as source.The additional parameter is -ro for read only and cow, which means the file is copied into -the container and removed if not modified.`) + baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, `source[:destination[:{ro|cow}]] +Bind a local path which must exist into the container. If destination is not +set, uses the same path as source. "ro" binds read-only. "cow" temporarily +copies the file into the container.`) baseCmd.PersistentFlags().StringVarP(&nodeName, "node", "n", "", "Create a read only view of the container for the given node") } diff --git a/userdocs/contents/containers.rst b/userdocs/contents/containers.rst index f30451a2..b46f34eb 100644 --- a/userdocs/contents/containers.rst +++ b/userdocs/contents/containers.rst @@ -214,7 +214,7 @@ when using the exec command. This works as follows: distribution (as prescribed by the LSB file hierarchy standard). Files which should always be present in a container image like ``resolv.conf`` -can be specified in ``warewulf.conf`` with following container_exit +can be specified in ``warewulf.conf``: .. code-block:: yaml container mounts: @@ -223,10 +223,9 @@ can be specified in ``warewulf.conf`` with following container_exit readonly: true .. note:: - Instead of the ``readonly`` setting you can set ``cow``, which - has the effect, that the source file is copied to the container - and removed if it was modified. This useful for file used for - registrations. + Instead of ``readonly: true`` you can set ``cow: true``. This causes the + source file to be copied to the container and removed if it was not + modified. This can be useful for files used for registrations. When the command completes, if anything within the container changed, the container will be rebuilt into a bootable static object