Commit Graph

371 Commits

Author SHA1 Message Date
Daniel J Walsh e8c123cc03 Change references to projectatomic/libpod to containers/libpod
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #928
Approved by: umohnani8
2018-08-15 20:13:50 +00:00
TomSweeneyRedHat ae1b14cd4c Add container PATH retrieval example
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #932
Approved by: rhatdan
2018-08-15 18:51:33 +00:00
Nalin Dahyabhai f94159340b Don't bother with --no-pivot for rootless isolation
When running outside of a container, --no-pivot isn't necessary, and
when running inside of a container, it's not enough to solve any of the
difficulties we're seeing there.  It may trigger an EPERM for unshare()
calls inside of the container that we launch, and we don't want that, so
drop it, for now at least.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #921
Approved by: rhatdan
2018-08-10 13:28:49 +00:00
Valentin Rothberg 45a9d37e75 release v1.3: mention openSUSE
Buildah v1.3 is already in openSUSE Tumbleweed, so let's put it on the
list of Buildah-shipping distributions.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #915
Approved by: rhatdan
2018-08-08 09:08:16 +00:00
TomSweeneyRedHat 618e790d8e Add Release Announcements directory
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #914
Approved by: rhatdan
2018-08-07 20:28:24 +00:00
TomSweeneyRedHat 909e859971 bud should not search context directory for Dockerfile
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #905
Approved by: rhatdan
2018-08-03 20:36:57 +00:00
Nalin Dahyabhai 40bb4a5b47 Add a value for IsolationOCIRootless
Add a new Isolation value: IsolationOCIRootless, for which we add a
global --rootless=true flag and a local --no-new-keyring flag when
creating a runtime container, and make some changes to the mounts list,
default namespacing configurations, and supplemental groups list.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #873
Approved by: rhatdan
2018-08-03 19:49:19 +00:00
Daniel J Walsh a2b018430d Set the default ulimits to match Docker
We want to set the maximum number of processes and number of open files
to match the Docker defaults.

nofile=1048576:1048576, nproc=1048576:1048576

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #891
Approved by: rhatdan
2018-08-03 09:02:08 +00:00
Daniel J Walsh c5051bc816
Merge pull request #899 from rhatdan/man
Fix the the in buildah-config man page
2018-08-02 13:58:33 -04:00
Valentin Rothberg 2ecebdd431 preprocess ".in" suffixed Dockerfiles
Use CPP(1) on any input Dockerfile with a ".in" suffix.  This allows to
decompose Dockerfiles and make them reusable via the `#include`
directive.  Notice that those Dockerfiles can still be used by other
tools by manually running `cpp -E` on them.

This change affects both, the `imagebuild.BuildDockerfiles(...)` API and
buildah-bud.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #893
Approved by: rhatdan
2018-08-02 13:42:21 +00:00
Daniel J Walsh a1d7dca14b
Fix the the in buildah-config man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-08-02 09:26:55 -04:00
TomSweeneyRedHat 834a6c848c Create buildah pull command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #889
Approved by: rhatdan
2018-08-01 18:37:36 +00:00
Nalin Dahyabhai 38ef1231f2 Add and implement IsolationChroot
Add an IsolationChroot that trades flexibility and isolation for being
able to do what it does in a host environment that's already isolated to
the point where we're not allowed to set up some of that isolation,
producing a result that leans more toward chroot(1) than runc(1) does.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #836
Approved by: rhatdan
2018-08-01 14:04:59 +00:00
Daniel J Walsh c18724ebd7 Allow Dockerfile content to come from stdin
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #888
Approved by: TomSweeneyRedHat
2018-07-27 23:15:09 +00:00
Zhou Hao 47da945078 add rename command
Add rename command to rename a local container.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #857
Approved by: rhatdan
2018-07-19 13:37:07 +00:00
Zhou Hao 1215b160e8 Completion command
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #868
Approved by: rhatdan
2018-07-18 13:17:23 +00:00
Zhou Hao e91cfd8bcf Add --cidfile option to from
Add --cidfile option which specifiles the file to write the container, when create a conatiner.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #847
Approved by: TomSweeneyRedHat
2018-07-06 14:21:11 +00:00
Nalin Dahyabhai 7bafc30741 Add a --loglevel option to build-with-dockerfile
Add a --loglevel option to build-with-dockerfile and use it to add
a value from -2 to 3 to the default logrus LogError logging level.
This makes --loglevel 3 equivalent in effect to the global --debug
option.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #845
Approved by: rhatdan
2018-07-05 16:01:08 +00:00
Zhou Hao 5c11c3481f cmd: Code improvement
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #843
Approved by: rhatdan
2018-07-02 12:10:23 +00:00
W. Trevor King a9c12065b3 docs: Follow man-pages(7) suggestions for SYNOPSIS
man-pages(7) has [1]:

> For commands, this shows the syntax of the command and its arguments
> (including options); boldface is used for as-is text and italics are
> used to indicate replaceable arguments. Brackets ([]) surround
> optional arguments, vertical bars (|) separate choices, and ellipses
> (...) can be repeated.

I've adjusted our SYNOPSIS entries to match that formatting, and
generally tried to make them more consistent with the precedent set by
the man-pages project.  Outside of the SYNOPSIS entry, I prefer using
backticks for literals, although in some places I've left the **
bolding to keep things visually similar to a nearby SYNOPSIS entry.

I've also simplified a few placeholders, e.g. "containerID" ->
"container", because I didn't think the additional bit was providing
much additional context.  If there is ambiguity about the
representation, it should be addressed in the DESCRIPTION instead of
with an "ID" or "Name" suffix.

[1]: http://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #839
Approved by: rhatdan
2018-06-30 10:31:06 +00:00
Zhou Hao 7d4b593eb9 umount: add all option to umount all mounted containers
Umount all of the currently mounted containers.
After change:

```
➜  buildah git:(umount-all) sudo ./buildah umount --all
43e674866c4cb46dfc64988b95a8247d6ae5fd17f0b15a46f16a81cb62a55353
14d5fbebf8eadf8056f72271cff1e86147fe40990331c5bf76e251f3cdd25b81
07d02e23e58503a33ec1886c1bfd6e9831fe05c5ac2ea8c6d9e2a939cb40b9fc
```

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #825
Approved by: rhatdan
2018-06-29 15:54:37 +00:00
Nalin Dahyabhai 18063d19b6 main: if unprivileged, reexec in a user namespace
If our CLI is invoked as an unprivileged user (uid != 0),
* create a namespace using our own UID and GID as "0" followed by the
  ranges matching our name and our primary group's name that we find in
  /etc/subuid and /etc/subgid (the latter by way of using newuidmap and
  newgidmap)
* re-exec ourselves inside of that user namespace, prepending global CLI arguments that:
  * override the driver from storage.conf with "vfs"
  * override the storage root from storage.conf with a "containers/storage" subdirectory
    of $XDG_DATA_HOME, or $HOME/.local/share.
  * override the storage runroot from storage.conf with either "$XDG_RUNTIME_DIR/run" or
    "/var/run/user/$uid/run"
  * set default ID mapping settings to map all of the ranges matching
    our name and our primary group's name that we found in /etc/subuid
    and /etc/subgid
  * can still be overridden using the command line

Add a "buildah unshare" CLI that will start an arbitrary command in the
first namespace, so that manual cleanup of locations used by the second
namespace will be possible.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #823
Approved by: rhatdan
2018-06-28 18:22:35 +00:00
Nalin Dahyabhai 29359f0d0b Implement basic recognition of the "--isolation" option
Add the basics of handling the "--isolation" option, though at the
moment, the only recognized option is "oci", which is our default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #822
Approved by: rhatdan
2018-06-26 22:37:38 +00:00
TomSweeneyRedHat f53d1dde1a Add info on registries.conf to from manpage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #817
Approved by: rhatdan
2018-06-25 16:16:34 +00:00
TomSweeneyRedHat 2ac95ea682 ONBUILD tutorial
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #808
Approved by: rhatdan
2018-06-24 11:47:59 +00:00
Zhou Hao 4740a49374 mount: support multiple inputs
Multiple containers can be entered at one time for mount.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #791
Approved by: rhatdan
2018-06-20 13:14:11 +00:00
Nalin Dahyabhai 0a8bdef96c Allow --userns-uid-map/--userns-gid-map to be global options
Allow --userns-uid-map and --userns-gid-map to be specified as global
options, which can be overridden by options specified to commands which
know them as non-global options.

This will mainly benefit tools that want to set ID mappings for buildah
to use, but which don't want to have to figure out whether or not
they're invoking it with a subcommand that recognizes these options.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #803
Approved by: rhatdan
2018-06-19 16:52:55 +00:00
Nalin Dahyabhai 2064b29f40 Run(): add options for adding and removing capabilities
Add RunOptions and BuildOptions flags for modifying the list of granted
capabilities from the default.

Default to granting the current (as of this writing) defaults from
runtime-tools, with CAP_NET_RAW removed:
* CAP_AUDIT_WRITE
* CAP_CHOWN
* CAP_DAC_OVERRIDE
* CAP_FOWNER
* CAP_FSETID
* CAP_KILL
* CAP_MKNOD
* CAP_NET_BIND_SERVICE
* CAP_SETFCAP
* CAP_SETGID
* CAP_SETPCAP
* CAP_SETUID
* CAP_SYS_CHROOT

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #799
Approved by: rhatdan
2018-06-18 21:07:08 +00:00
Nalin Dahyabhai 78f6451bc2 Escape use of '_' in .md docs
Escape uses of _ in markdown docs, so that it isn't mistakenly treated
as a formatting character.

Fix a couple of copy-paste errors.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #794
Approved by: rhatdan
2018-06-18 18:39:58 +00:00
umohnani8 fc438bb932 Add --rm and --force-rm to buildah bud
--rm removes all intermediate containers if the build was successful.
If unsuccessful, the intermediate container at which the failure occured
will persist in the container store.
--force-rm removes all intermediate containers even if the build was
unsuccessful.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #788
Approved by: rhatdan
2018-06-14 16:20:25 +00:00
umohnani8 9018eef97b Add --all,-a flag to buildah images
By default buildah will not show intermediate images created during builds.
When the --a flag is set, buildah will output the intermediate images as well.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #789
Approved by: rhatdan
2018-06-14 14:30:45 +00:00
Daniel J Walsh 3a849c02a6 Add environment variable BUILDAH_RUNTIME
Allow user to setup alternate runtimes to use rather then
runc.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #786
Approved by: rhatdan
2018-06-13 07:40:46 +00:00
umohnani8 6c4bef7f2e Add --layers and --no-cache to buildah bud
This patch adds in the caching feature to buildah bud.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #784
Approved by: rhatdan
2018-06-12 20:20:39 +00:00
TomSweeneyRedHat a98be4af90 Touch up images man
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #781
Approved by: rhatdan
2018-06-12 16:01:59 +00:00
Zhou Hao 4273745f70 version.md: fix DESCRIPTION
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #780
Approved by: rhatdan
2018-06-12 15:14:41 +00:00
TomSweeneyRedHat 94c1e6dd68 Change 'registries' to 'container registries' in man
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #774
Approved by: rhatdan
2018-06-11 14:10:56 +00:00
Nalin Dahyabhai ae27963cb0 Add(): learn to record hashes of what we add
Add a field to AddOrCopyOptions that can take an io.Writer, more often a
hash.Hash returned by digest.Digester's Hash() method, to calculate a
sum over what we add or copy.

Make the help output summarizing the arguments that "buildah add" and
"buildah copy" accept more closely match their man pages.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #766
Approved by: rhatdan
2018-06-11 12:39:05 +00:00
pixdrift fbc03e67b0 Minor update to buildah config documentation for entrypoint
Signed-off-by: pixdrift <support@pixeldrift.net>

Closes: #771
Approved by: rhatdan
2018-06-10 20:23:28 +00:00
TomSweeneyRedHat 10ca462c50 Add registries.conf link to a few man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #770
Approved by: rhatdan
2018-06-10 10:37:58 +00:00
Daniel J Walsh 074a498ec0 Print Warning message if cmd will not be used based on entrypoint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #741
Approved by: TomSweeneyRedHat
2018-06-08 13:38:54 +00:00
KyleRConway 39d0582204 Update 01-intro.md
Adding command to explicitly become root user. I was trying to run commands with "sudo" in front and thus had issues following guide (new user) and this would have helped! Thanks!

Signed-off-by: Kyle R. Conway <kyconway@tower.Home>

Closes: #763
Approved by: rhatdan
2018-06-08 08:31:08 +00:00
TomSweeneyRedHat 73ed7a5000 Add disable-content-trust noop flag to bud
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-06-06 15:04:33 -04:00
Nalin Dahyabhai c66def9aeb Run(): provide redirection for stdio
Provide RunOption fields for callers to give us stdio as an
io.ReadCloser and a pair of io.WriteClosers, or nil to use
os.Stdin/os.Stdout/os.Stderr.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #754
Approved by: rhatdan
2018-06-06 13:17:25 +00:00
Daniel J Walsh a3382c36bf Add environment variable to buildah --format
If you decide you want to only build and support docker format
images, you can set this in your environment and buildah
will defautl to building docker images.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #742
Approved by: TomSweeneyRedHat
2018-06-01 17:40:15 +00:00
Daniel J Walsh b66e853145 Add OnBuild support for Dockerfiles
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #722
Approved by: mheon
2018-05-31 13:30:29 +00:00
TomSweeneyRedHat 3e1f4aeb98 Touchup tutorial for run changes
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #734
Approved by: rhatdan
2018-05-30 13:48:15 +00:00
Zhou Hao 1501529b38 images: Error if the specified imagename does not exist
The images option allows the image name to be specified. If the specified image does not exist, an error should be output.

Before modification:
```
➜  buildah git:(images-wron-name) sudo buildah images --format {{.ID}} 456
```

After modification:
```
➜  buildah git:(images-wron-name) sudo ./buildah images --format {{.ID}} 456
No such image 456

```

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #727
Approved by: rhatdan
2018-05-29 15:51:27 +00:00
Nalin Dahyabhai 3dc0623ac1 Add example CNI configurations
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #700
Approved by: rhatdan
2018-05-24 14:10:01 +00:00
Nalin Dahyabhai 00fafcf9cb Use CNI to configure container networks
Use CNI to configure networks for containers for which we create new
network namespaces.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #700
Approved by: rhatdan
2018-05-24 14:10:01 +00:00
Nalin Dahyabhai 0afa60eb05 Add CLI options for specifying namespace and cgroup setup
Add options to the CLI that specify which cgroups we execute "run"
commands under, and controlling how we set up namespaces for them.
Pass them down to Builders that we create, and allow them to be
overridden by options passed to Builder.Run().

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #700
Approved by: rhatdan
2018-05-24 14:10:01 +00:00
Nalin Dahyabhai 71f0f9d063 build-using-dockerfile: add --annotation
Add an --annotation flag to "buildah build-using-dockerfile".

Refactor the logic for --label handling to use SetLabel() to set them in
the image configuration in Executor.Commit(), instead of passing them as
a field in CommitOptions for Builder.Commit() and expecting it to do so.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #716
Approved by: rhatdan
2018-05-22 19:27:45 +00:00
Nalin Dahyabhai c806e6e065 Implement --squash for build-using-dockerfile and commit
Handle a Squash option when committing images, and make it available as
a flag for "buildah commit" and "buildah build-using-dockerfile".

Breaks up containerImageRef.NewImageSource to keep the complexity more
manageable.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #714
Approved by: rhatdan
2018-05-22 16:43:58 +00:00
Nalin Dahyabhai 1ad8dc0c24 Documentation fixes
Update some comments and a couple of man pages.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #709
Approved by: rhatdan
2018-05-18 19:58:31 +00:00
Nalin Dahyabhai a855573b92 Make "run --terminal" and "run -t" aliases for "run --tty"
I swear I can never remember which one it is.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #706
Approved by: rhatdan
2018-05-18 16:51:08 +00:00
Daniel J Walsh 02cc30ba17 Add support for buildah bud --label
We want to be able to add labels when building a container image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #698
Approved by: umohnani8
2018-05-18 14:03:35 +00:00
Daniel J Walsh 5d9d28ba1f Attempt to download file from url, if fails assume Dockerfile
If you do a
podman bud http://example.com/Dockerfile

podman currently assumes the file is an archive, if it is not an archive
we should assume it is a Dockerfile, download and create a Dockerfile in the
directory.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #687
Approved by: TomSweeneyRedHat
2018-05-15 14:08:30 +00:00
TomSweeneyRedHat 0ae62e326a Touchup man page short options across man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #675
Approved by: rhatdan
2018-05-11 16:23:15 +00:00
pixdrift e17534d816 Add cpu-shares short flag (-c) and cpu-shares CI tests
Signed-off-by: pixdrift <support@pixeldrift.net>

Closes: #670
Approved by: rhatdan
2018-05-10 15:52:19 +00:00
Zhou Hao 906ee37d16 buildah-from: add effective value to mount propagation
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #661
Approved by: rhatdan
2018-05-07 14:05:52 +00:00
pixdrift 8e77a0c2f7 Add cache-from and no-cache noops, and fix doco
Signed-off-by: pixdrift <support@pixeldrift.net>

Closes: #659
Approved by: rhatdan
2018-05-07 13:24:43 +00:00
pixdrift 8e519c76b5 Update option and documentation for --force-rm
Signed-off-by: pixdrift <support@pixeldrift.net>

Closes: #659
Approved by: rhatdan
2018-05-07 13:24:43 +00:00
TomSweeneyRedHat 45772e84e4 Add Files section with registries.conf to pertinent man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #653
Approved by: rhatdan
2018-05-04 11:54:07 +00:00
Nalin Dahyabhai 44468f811c Force "localhost" as a default registry
Extend util.ResolveName() to prepend "localhost" to the list of
registries, and teach util.FindImage(), util.ExpandNames(), and
util.AddImageNames() to use util.ResolveName().

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #648
Approved by: rhatdan
2018-05-02 19:52:53 +00:00
umohnani8 e6b6c9fc2d Validate host and container paths passed to --volume
Print proper error message if the host or container paths
are relative paths. Only absolute paths are allowed.
Fix the buildah run documentation for the --volume flag
and add an example.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #643
Approved by: rhatdan
2018-04-30 19:57:07 +00:00
Daniel J Walsh 072ee88817 Add --compress, --rm, --squash flags as a noop for bud
We don't have a client server operation, so there
is no reason to compress the input.

We don't currently support cache so --rm and --squash are NOOPS

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #639
Approved by: rhatdan
2018-04-30 13:40:59 +00:00
Nalin Dahyabhai 523b1095d8 Add config --comment/--domainname/--history-comment/--hostname
Add options to "buildah config" for setting comment, domainname, and
hostname configuration bits, and the comment in history items which
describe layers that we add, and tests for them.  Add a test for the
--shell option while we're at it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #641
Approved by: rhatdan
2018-04-27 16:33:13 +00:00
Nalin Dahyabhai c3c6cb2cbd 'buildah config': stop replacing Created-By whenever it's not specified
The CLI shouldn't have had a default here, which made us treat it as if
it had been specified every time, potentially overwriting a value that
had previously been explicitly set.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #641
Approved by: rhatdan
2018-04-27 16:33:13 +00:00
Daniel J Walsh ca1704fcbb Modify man pages so they compile correctly in mandb
This fixes an issue where if you did
man -k buildah-bud

buildah-bud (1)    - (unknown subject)

Now you will see

man -k buildah-bud
buildah-bud (1)      - Build an image using instructions from Dockerfiles.

More importantly
man -k Dockerfile
buildah-bud (1)      - Build an image using instructions from Dockerfiles.
docker-build (1)     - Build an image from a Dockerfile
docker-image-build (1) - Build an image from a Dockerfile
Dockerfile (5)       - automate the steps of creating a Docker image
podman-build (1)     - Build a container image using a Dockerfile.

Will now list buildah-d

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #638
Approved by: TomSweeneyRedHat
2018-04-26 17:16:23 +00:00
Daniel J Walsh 83f48300da Add description on how to do --isolation to buildah-bud man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #637
Approved by: TomSweeneyRedHat
2018-04-26 13:27:29 +00:00
Daniel J Walsh 3088277ee8 Add support for --iidfile to bud and commit
Add support for an --iidfile which specifies the file to write the
image id, when committing a new image.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #636
Approved by: TomSweeneyRedHat
2018-04-26 12:19:43 +00:00
Zhou Hao 5354a288d1 buildah-image: add validation to 'format'
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #605
Approved by: rhatdan
2018-04-20 10:53:57 +00:00
Daniel J Walsh e008b736ac Clarify the use of buildah config options
Make it clearer to the user which options can be executed
multiple times, versus those that can only used once.

Cleanup some documentation issues

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #592
Approved by: rhatdan

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #602
Approved by: pixdrift
2018-04-19 10:42:45 +00:00
Zhou Hao 06d968af7b buildah-containers: add tests and example to the man page
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #589
Approved by: rhatdan
2018-04-18 14:10:24 +00:00
Daniel J Walsh 2015cde90c Clarify the use of buildah config options
Make it clearer to the user which options can be executed
multiple times, versus those that can only used once.

Cleanup some documentation issues

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #592
Approved by: rhatdan
2018-04-17 18:35:40 +00:00
TomSweeneyRedHat b81af1e212 Display imageId after commit
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #566
Approved by: rhatdan
2018-04-12 12:15:33 +00:00
Zhou Hao f2c532a958 config: add support for StopSignal
Add a stop-singnal option for buildah-config.

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #567
Approved by: rhatdan
2018-04-12 06:58:26 +00:00
TomSweeneyRedHat 6583273185 Allow umount to have multi-containers
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #561
Approved by: rhatdan
2018-04-08 13:07:37 +00:00
umohnani8 4743c2e7f1 Update buildah push doc
The example for the oci transport was misleading as it showed a different format.
Added an example for oci-archive. Added oci-archive to the Destinations.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #559
Approved by: rhatdan
2018-04-06 18:49:30 +00:00
TomSweeneyRedHat 169b0f7c23 Imagename is required for commit atm, update manpage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #554
Approved by: rhatdan
2018-04-04 22:09:12 +00:00
Daniel J Walsh 5ce80091ba Add support for shell
Also vendor in the latest imagebuilder code and all the packages
that come with it.

Note: imagebuilder.NewBuilderForReader has been removed from imagebuilder
so I had to split the function up into two different calls.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #517
Approved by: rhatdan
2018-04-03 22:25:56 +00:00
TomSweeneyRedHat 78b0a37293 Change image time to locale, add troubleshooting.md, add logo to other mds
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #544
Approved by: rhatdan
2018-03-30 11:41:45 +00:00
Zhou Hao a541a22ff6 buildah-run.md: fix error SYNOPSIS
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #545
Approved by: rhatdan
2018-03-30 11:40:00 +00:00
Zhou Hao 09f3d27cba docs: fix error example
Fix the following error example:
```
➜  /data sudo buildah from imagename --signature-policy /etc/containers/policy.json
too many arguments specified
```

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>

Closes: #540
Approved by: TomSweeneyRedHat
2018-03-28 12:28:24 +00:00
Daniel J Walsh 914956e83e Make default-mounts-file a hidden option
Also add FILES section to buildah man page to describe the files used
with buildah.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #534
Approved by: @TomSweeneyRedHat
2018-03-26 14:16:22 +00:00
Daniel J Walsh 28a64ee68c Document the mounts.conf file
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #521
Approved by: rhatdan
2018-03-23 14:06:29 +00:00
Daniel J Walsh 604fdb0de1 Fix man pages to format correctly
I noticed when you look at the man pages with man ./doc/buildah.1 that the
headings were not showing up.  go-md2man wanted to have a primary header
in order to format them correctly.  Removing the first # from the first line
fixes the issue.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #521
Approved by: rhatdan
2018-03-23 14:06:29 +00:00
umohnani8 1ca41dcbcb Add various transport support to buildah from
buildah from now supports pulling images using the following transports:
docker-archive, oci-archive, and dir.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #524
Approved by: TomSweeneyRedHat
2018-03-22 17:22:47 +00:00
Daniel J Walsh 55451c2217 If the user overrides the storage driver, the options should be dropped
Since the driver options are configured in storage.conf based on the selected
driver then the user overrideing them should cause the options to drop.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #528
Approved by: rhatdan
2018-03-20 12:52:42 +00:00
umohnani8 4bbe6e7cc0 Implement --volume and --shm-size for bud and from
Add the remaining --volume and --shm-size flags to buildah bud and from
--volume supports the following options: rw, ro, z, Z, private, slave, shared

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #491
Approved by: rhatdan
2018-02-23 17:53:00 +00:00
umohnani8 93a3c89943 Add the following flags to buildah bud and from
--add-host
	--cgroup-parent
	--cpu-period
	--cpu-quota
	--cpu-shares
	--cpuset-cpus
	--cpuset-mems
	--memory
	--memory-swap
	--security-opt
	--ulimit

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #477
Approved by: rhatdan
2018-02-19 17:00:29 +00:00
TomSweeneyRedHat 95f16ab260 Remove you/your from manpages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #484
Approved by: rhatdan
2018-02-19 14:30:16 +00:00
umohnani8 4eb654f10c Removing docs and completions for run options
Figured that these options need to be in from and bud instead.
Removed the options from the documentation of run and bud for now.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #470
Approved by: rhatdan
2018-02-12 15:22:09 +00:00
Benjamin Kircher 67b565da7b Docs: note that buildah needs to run as root
You have to be root to run buildah. This commit adds a notice to the
buildah(1) man-page and improves the front-page README.md a bit so that
this is more obvious to the user.

Fixes issue #420.

Signed-off-by: Benjamin Kircher <benjamin.kircher@gmail.com>

Closes: #462
Approved by: rhatdan
2018-02-10 12:07:07 +00:00
TomSweeneyRedHat df2a10d43f Add limitation to buildah rmi man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #464
Approved by: rhatdan
2018-02-10 11:15:34 +00:00
TomSweeneyRedHat e9915937ac Rename tutorials.md to README.md in tutorial dir
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #459
Approved by: rhatdan
2018-02-10 11:14:52 +00:00
Daniel J Walsh 5a9c591abf
Merge pull request #455 from umohnani8/certs
Make /etc/containers/certs.d the default certs directory
2018-02-07 08:44:32 -05:00
umohnani8 811cf927d7 Change default certs directory to /etc/containers/certs.dir
Made changes to the man pages to reflect this.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2018-02-06 17:04:34 -05:00
umohnani8 c14697ebe4 Add documentation and completions for the following flags
--add-host
	--cgroup-parent
	--cpu-period
	--cpu-quota
	--cpu-shares
	--cpuset-mems
	--memory
	--memory-swap
	--security-opt
	--ulimit

These flags are going to be used by buildah run and bud.
The implementation will follow in another PR.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2018-02-06 12:45:17 -05:00
umohnani8 85a37b39e8 Add --format and --filter to buildah containers
buildah containers now supports oretty-printing using a Go template
with the --format flag. And output can be filtered based on id, name, or
ancestor.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #437
Approved by: rhatdan
2018-02-02 19:32:06 +00:00
Arthur Mello 49095a83f8 Add --prune,-p option to rmi command
Allows rmi to remove all dangling images (images without a tag and without a child image)
Add new test case

Signed-off-by: Arthur Mello <amello@redhat.com>

Closes: #418
Approved by: rhatdan
2018-02-01 10:50:33 +00:00
TomSweeneyRedHat 6c05a352df Add authfile param to commit
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #433
Approved by: rhatdan
2018-02-01 05:48:09 +00:00
umohnani8 1849466827 Fix --runtime-flag for buildah run and bud
The --runtime-flag flag for buildah run and bud would fail
whenever the global flags of the runtime were passed to it.
Changed it to accept the format [global-flag]=[value] where
global-flag would be converted to --[global-flag] in the code.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #431
Approved by: rhatdan
2018-01-30 18:21:46 +00:00
TomSweeneyRedHat 7dc787a9c7 Prompt for un/pwd if not supplied with --creds
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2018-01-25 15:03:59 -05:00
TomSweeneyRedHat 5179733c63 Update auth tests and fix bud man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #404
Approved by: rhatdan
2018-01-22 13:34:50 +00:00
TomSweeneyRedHat 40c3a57d5a Try to fix buildah-containers.md CI test issue
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #395
Approved by: rhatdan
2018-01-19 20:20:13 +00:00
TomSweeneyRedHat 17d9a73329 Touchup rm and container man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #391
Approved by: rhatdan
2018-01-16 15:48:29 +00:00
TomSweeneyRedHat fd995e6166 Add --all functionality to rmi
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #384
Approved by: rhatdan
2018-01-08 21:07:25 +00:00
TomSweeneyRedHat b8740e386e Add --all to remove containers
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #382
Approved by: rhatdan
2018-01-05 15:53:19 +00:00
TomSweeneyRedHat f4151372e5 Create Tutorials menu and add link to README.md
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #367
Approved by: rhatdan
2017-12-15 21:28:32 +00:00
Nalin Dahyabhai 47ac96155f Use configured registries to resolve image names
When locating an image for pulling, inspection, or pushing, if we're
given an image name that doesn't include a domain/registry, try building
a set of candidate names using the configured registries as domains, and
then pull/inspect/push using the first of those names that works.

If a name that we're given corresponds to a prefix of the ID of a local
image, skip completion and use the ID directly instead.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #360
Approved by: rhatdan
2017-12-14 22:21:16 +00:00
William Henry 4d943752fe Fixed some more Tom nits.
Signed-off-by: William Henry <whenry@redhat.com>
2017-12-07 10:57:14 -07:00
William Henry 9128a40ada Fixed some Tom nits.
Signed-off-by: William Henry <whenry@redhat.com>
2017-12-07 09:18:13 -07:00
William Henry 8910199181 Add a new tutorial for using Buildah with registries
Signed-off-by: William Henry <whenry@redhat.com>
2017-12-07 08:40:03 -07:00
Fabio Bertinatto 1fc5a49958 Add --chown option to add/copy commands
Signed-off-by: Fabio Bertinatto <fbertina@redhat.com>

Closes: #336
Approved by: rhatdan
2017-12-07 13:45:12 +00:00
Urvashi Mohnani 819c227bf2 Mention docker login in documentation for authentication
Since we fall back to reading the credentials from $HOME/.docker/config
set by docker login when kpod login doesn't have the credentials

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #331
Approved by: rhatdan
2017-11-21 18:06:44 +00:00
Urvashi Mohnani 7a3bc6efd4 Use credentials from kpod login for buildah
buildah push and from now use the credentials stored in ${XDG_RUNTIME_DIR}/containers/auth.json by kpod login
if the auth file path is changed, buildah push and from can get the credentials from the custom auth file
using the --authfile flag
e.g buildah push --authfile /tmp/auths/myauths.json alpine docker://username/image

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #325
Approved by: rhatdan
2017-11-16 18:08:52 +00:00
Urvashi Mohnani 4419612150 Add manifest type conversion to buildah push
buildah push supports manifest type conversion when pushing using the 'dir' transport
Manifest types include oci, v2s1, and v2s2
e.g buildah push --format v2s2 alpine dir:my-directory

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #321
Approved by: rhatdan
2017-11-15 13:38:28 +00:00
Daniel J Walsh 3e8ded8646 Add secrets patch to buildah
Signed-off-by: umohnani8 <umohnani@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-08 00:01:57 +00:00
TomSweeneyRedHat 01db066498 Add tls-verify to bud command
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #297
Approved by: nalind
2017-11-07 19:07:30 +00:00
William Henry dbea38b440 Add root prompt and some other minor changes
Signed-off-by: William Henry <whenry@redhat.com>
2017-11-02 10:30:11 -06:00
William Henry 0bc120edda Made some edits based on tsweeney feedback.
Signed-off-by: William Henry <whenry@redhat.com>
2017-11-02 10:13:30 -06:00
William Henry 79663fe1a0 Added file tutorials/01-intro.md
A basic introduction to buildah tutorial

Topics covered:
buildah from a base
briefly describes containers/storage and containers/image
buildah run
buildah from scratch
installing packages and files to a scratch image
buildah push and running a buildah built container in docker
buildah bud

Signed-off-by: William Henry <whenry@redhat.com>

Closes: #302
Approved by: rhatdan
2017-10-31 13:06:51 +00:00
Daniel J Walsh d63314d737 Add logos for buildah
Thanks to Máirín Duffy for building these logos for e Buildah project

Patch also fixes references to the project Buildah to be upper case.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-26 15:23:24 -07:00
TomSweeneyRedHat 6124673bbc Add further tty verbiage to buildah run
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #276
Approved by: rhatdan
2017-10-03 10:44:07 +00:00
Daniel J Walsh 57a0f38db6 Cleanup buildah-images code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh ff39bf0b80 Cleanup buildah code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh 4b38cff005 Cleanup buildah-push code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh 89949a1156 Cleanup buildah-from code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh 97ec4563b4 Cleanup buildah-containers code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh 47665ad777 Cleanup buildah-commit code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh e1e58584a9 Cleanup buildah-bud code
1. Sort options so they are in alphabet order
2. Remove extra lines of code for options parsing that really do not accomplish anything.
3. Remove variables when they are not necessary, I.E. Don't create a variable to hold an
option that is only used once, use the option instead.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #267
Approved by: <username_without_leading_@>
2017-09-26 18:11:26 +00:00
Daniel J Walsh 62fc48433c Add support for `buildah run --hostname`
Need to set the hostname inside of a container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #266
Approved by: nalind
2017-09-24 09:55:24 +00:00
TomSweeneyRedHat c9c735e20d Add authentication to commit and push
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #250
Approved by: rhatdan
2017-08-29 15:20:19 +00:00
Daniel J Walsh 9e088bd41d Add information on buildah from man page on transports
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #234
Approved by: rhatdan
2017-08-29 10:37:54 +00:00
Daniel J Walsh 52087ca1c5 Remove --transport flag
This is no simpler then putting the transport in the image page,
we should default to the registry specified in containers/image
and not override it.  People are confused by this option, and I
see no value.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #234
Approved by: rhatdan
2017-08-29 10:37:54 +00:00
TomSweeneyRedHat 498f0ae9d7 Add credentials to buildah from
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add credentials to buildah from

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #204
Approved by: nalind
2017-08-22 18:55:38 +00:00
Daniel J Walsh ee91e6b981 Remove export command
We have implemented most of this code in kpod export, and we now
have kpod import/load/save.  No reason to implement them in both
commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #245
Approved by: nalind
2017-08-17 19:40:47 +00:00
Nalin Dahyabhai 94f2bf025a Replace --registry with --transport
Replace --registry command line flags with --transport.  For backward
compatibility, add Transport as an addtional setting that we prepend to
the still-optional Registry setting if the Transport and image name
alone don't provide a parseable image reference.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #235
Approved by: rhatdan
2017-08-03 15:55:13 +00:00
Daniel J Walsh 5259a84b7a atomic transport is being deprecated, so we should not document it.
containers/image now fully supports pushing images and signatures to an
openshift/atomic registry using the docker:// transport.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #238
Approved by: rhatdan
2017-08-02 12:01:26 +00:00
TomSweeneyRedHat bf83bc208d Add quiet description and touch ups
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #233
Approved by: rhatdan
2017-07-30 12:34:36 +00:00
Dan Walsh c8a887f512 Add support for -- ending options parsing to buildah run
If you specify an option in a buildah run command, the command fails.
The proper syntax for this is to add --

buildah run $ctr -- ls -l /

Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #197
Approved by: nalind
2017-07-18 19:19:45 +00:00
Daniel J Walsh dd98523b8d Add flag to remove containers on commit
I think this would be good practice to eliminate wasted disk space.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #189
Approved by: rhatdan
2017-07-17 19:07:21 +00:00
Daniel J Walsh 98ca81073e Improve buildah push man page and help information
This better documents the options available to the user.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #186
Approved by: rhatdan
2017-07-13 19:58:04 +00:00
Tomas Tomecek 5f80a1033b add a way to disable PTY allocation
Fixes #179

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #181
Approved by: nalind
2017-07-13 14:18:08 +00:00
Tomas Tomecek 70518e7093 clarify --runtime-flag of run command
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Fixes #178

Closes: #182
Approved by: rhatdan
2017-07-10 19:12:48 +00:00
Daniel J Walsh a49a32f55f Add buildah export support
Will export the contents of a container as a tar ball.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #170
Approved by: rhatdan
2017-06-28 20:06:42 +00:00
Daniel J Walsh 7af6ab2351 Add the missing buildah version from the readme and the buildah man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #173
Approved by: rhatdan
2017-06-28 15:59:35 +00:00
Ryan Cole 6d85cd3f7d update 'buildah images' and 'buildah rmi' commands
add more flags to `buildah images` and `buildah rmi`, and write tests

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>

Closes: #155
Approved by: rhatdan
2017-06-28 15:36:19 +00:00
Brent Baude e50fee5738 cmd/buildah/containers.go: Add JSON output option
Consumers of the buildah output will need structured text like
the JSON format.  This commit adds a --json option to
buildah containers.

Example output:
```
[
    {
        "ID": "8911b523771cb2e0a26ab9bb324fb5be4e992764fdd5ead86a936aa6de964d9a",
        "Builder": true,
        "ImageId": "26db5ad6e82d85265d1609e6bffc04331537fdceb9740d36f576e7ee4e8d1be3",
        "ImageName": "docker.io/library/alpine:latest",
        "ContainerName": "alpine-working-container"
    }
]

```

Signed-off-by: Brent Baude <bbaude@redhat.com>

Closes: #164
Approved by: rhatdan
2017-06-27 16:01:07 +00:00
umohnani8 63ca9028bc Add 'buildah version' command
Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #157
Approved by: rhatdan
2017-06-27 15:50:36 +00:00
Brent Baude 62845372ad cmd/buildah/images.go: Add JSON output option
The Atomic CLI will eventually need to be able to consume
structured output (in something like JSON).  This commit
adds a -j option to output to trigger JSON output of
images.

Example output:
```
[
    {
        "id": "aa66247d48aedfa3e9b74e4a41d2c9e5d2529122c8f0d43417012028a66f4f3b",
        "names": [
            "docker.io/library/busybox:latest"
        ]
    },
    {
        "id": "26db5ad6e82d85265d1609e6bffc04331537fdceb9740d36f576e7ee4e8d1be3",
        "names": [
            "docker.io/library/alpine:latest"
        ]
    }
]
```

Signed-off-by: Brent Baude <bbaude@redhat.com>

Closes: #161
Approved by: rhatdan
2017-06-26 16:05:58 +00:00
Nalin Dahyabhai 21b1a9349d Add a -a/--all option to "buildah containers"
Add a --all option to "buildah containers" that causes it to go through
the full list of containers, providing information about the ones that
aren't buildah containers in addition to the ones that are.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #148
Approved by: rhatdan
2017-06-22 21:01:33 +00:00
Nalin Dahyabhai 3163a98bdd Add a "push" command
Add a "push" command, which pulls an image's layers from local storage,
recomputes the image's digest and manifest, and uses the image library
to write the result to the specified location.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #141
Approved by: rhatdan
2017-06-13 21:50:42 +00:00
Nalin Dahyabhai 4a05d8643d Add an option to specify a Create date for images
Add CommitOption option that to allow a caller to specify a creation
timestamp to use in images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #141
Approved by: rhatdan
2017-06-13 21:50:42 +00:00
Nalin Dahyabhai 0d13621874 Add a --volume flag to "buildah run"
Add a --volume/-v flag to "buildah run" to allow volume bind mounts to
be specified on the command line.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #144
Approved by: rhatdan
2017-06-13 21:43:40 +00:00
Dan Walsh 7e042a9308 Cleanup man pages
Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #137
Approved by: nalind
2017-06-07 13:48:36 +00:00
Dan Walsh 59dfec35c3 buildah mount command should list mounts when no arguments are given.
buildah mount should work like the mount command and list all mount points
when no options are specified.

Need buildah umount to remove mount point from the database when a mount point
is umounted.

Also remove Mounts field from the builder object.  We only support a single mount
point so no reason for this field any longer.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #124
Approved by: nalind
2017-06-01 18:37:40 +00:00
Nalin Dahyabhai 4b6ba974cc Make the output image format selectable
Make it possible to select the output format for Commit() and the
imagebuildah package, and wire that through to a --format option in the
CLI's "commit" and "bud" commands.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #118
Approved by: rhatdan
2017-05-24 18:20:11 +00:00
Dan Walsh 45398cd196 Code cleanup
Other tools use --storage-opt, buildah should be consistent

Cleanup buildah.1 man page

add options to buildah man page
add missing commands

Finally sort the commands in the buildah command.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #112
Approved by: rhatdan
2017-05-23 15:47:15 +00:00
Nalin Dahyabhai 9bcd86d87b Fix a copy/paste error in a man page
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #111
Approved by: nalind
2017-05-19 20:34:57 +00:00
Nalin Dahyabhai 3065ea3d16 Add a "tag" command
Add a "tag" command, for adding names to locally-stored images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #110
Approved by: rhatdan
2017-05-19 19:59:47 +00:00
Nalin Dahyabhai 76395efa52 Add an initial "inspect" command
Add an "inspect" command, which can be used to dump the contents of the
Buildah object for a working container, or the starting one we'd get for
a specified image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #109
Approved by: rhatdan
2017-05-19 11:29:12 +00:00
Nalin Dahyabhai 12e582ee1a Report pull/commit progress by default
Have 'from', 'commit', and 'build-using-dockerfile' report progress via
stderr (so that capturing output from 'from' and 'commit' still works as
expected) unless --quiet is used to suppress the reporting.

Closes #94.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #98
Approved by: rhatdan
2017-05-10 12:53:25 +00:00
Daniel J Walsh 4c66c03b3d Remove --mount from buildah-from
We don't have a good way of identifying to a user where a container
was mounted on the file system when doing a buildah from.

A user can just do a buildah mount CID /mnt, after the from line to
handle this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #86
Approved by: nalind
2017-04-24 21:45:07 +00:00
Nalin Dahyabhai ce87a52ef4 bud: Add flags for specifying the runtime command
So long as it's possible to have an incompatible version of runc
installed, we're going to want to easily point to another version, as we
already allow for with the "run" command.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #76
Approved by: nalind
2017-04-19 18:58:13 +00:00
Dan Walsh 767389c87d Fix handling of man page for make install
Signed-off-by: Dan Walsh <dwalsh@redhat.com>

Closes: #72
Approved by: nalind
2017-04-18 20:20:10 +00:00
Nalin Dahyabhai aff92e565c Miscellaneous man page updates
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #67
Approved by: rhatdan
2017-04-14 10:12:01 +00:00
Nalin Dahyabhai 31b6e7b485 Add a man page for buildah-bud(1)
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #59
Approved by: rhatdan
2017-04-13 21:42:51 +00:00
TomSweeneyRedHat 2fe578c82f Create manpages for the buildah project
Second pass of manpages, more tweaking to follow.

Signed-off-by: TomSweeneyRedHat <tsweney@redhat.com>

Closes: #53
Approved by: nalind
2017-04-11 17:22:37 +00:00
TomSweeneyRedHat a5e1ac3761 First of several submits for buildah manpages 2017-03-22 16:14:23 -04:00
TomSweeneyRedHat 98dc5672bc First of several submits for buildah manpages 2017-03-22 14:40:31 -04:00