2018-03-20 17:41:19 +08:00
|
|
|
# buildah-add "1" "March 2017" "buildah"
|
2017-03-29 03:37:24 +08:00
|
|
|
|
|
|
|
## NAME
|
2018-04-26 21:01:15 +08:00
|
|
|
buildah\-add - Add the contents of a file, URL, or a directory to a container.
|
2017-03-29 03:37:24 +08:00
|
|
|
|
|
|
|
## SYNOPSIS
|
2017-04-14 03:42:04 +08:00
|
|
|
**buildah** **add** **containerID** **SRC** [[...] **DEST**]
|
2017-03-29 03:37:24 +08:00
|
|
|
|
|
|
|
## DESCRIPTION
|
2017-04-14 03:42:04 +08:00
|
|
|
Adds the contents of a file, URL, or a directory to a container's working
|
|
|
|
directory or a specified location in the container. If a local source file
|
|
|
|
appears to be an archive, its contents are extracted and added instead of the
|
|
|
|
archive file itself. If a local directory is specified as a source, its
|
|
|
|
*contents* are copied to the destination.
|
2017-03-29 03:37:24 +08:00
|
|
|
|
2017-11-30 22:34:02 +08:00
|
|
|
## OPTIONS
|
|
|
|
|
|
|
|
**--chown** *owner*:*group*
|
|
|
|
|
|
|
|
Sets the user and group ownership of the destination content.
|
|
|
|
|
2017-03-29 03:37:24 +08:00
|
|
|
## EXAMPLE
|
2017-04-14 03:42:04 +08:00
|
|
|
|
|
|
|
buildah add containerID '/myapp/app.conf' '/myapp/app.conf'
|
|
|
|
|
2017-11-30 22:34:02 +08:00
|
|
|
buildah add --chown myuser:mygroup containerID '/myapp/app.conf' '/myapp/app.conf'
|
|
|
|
|
2017-04-14 03:42:04 +08:00
|
|
|
buildah add containerID '/home/myuser/myproject.go'
|
|
|
|
|
|
|
|
buildah add containerID '/home/myuser/myfiles.tar' '/tmp'
|
|
|
|
|
|
|
|
buildah add containerID '/tmp/workingdir' '/tmp/workingdir'
|
|
|
|
|
|
|
|
buildah add containerID 'https://github.com/projectatomic/buildah/blob/master/README.md' '/tmp'
|
|
|
|
|
|
|
|
buildah add containerID 'passwd' 'certs.d' /etc
|
2017-03-29 03:37:24 +08:00
|
|
|
|
|
|
|
## SEE ALSO
|
|
|
|
buildah(1)
|