Commit Graph

25 Commits

Author SHA1 Message Date
ee3381f8f2 Minor fix splitting env vars in podman-commit
`string.Split()` splits into slice of size greater than 2
which may result in loss of environment variables

fixes 

Signed-off-by: Divyansh Kamboj <kambojdivyansh2000@gmail.com>
2019-05-19 06:51:30 +05:30
6b3d4abb07 Fix podman command --change CMD
Currently in Docker if you commit with --change 'CMD a b c'
The command that gets added is

[/bin/sh -c "a b c"]

If you commit --change 'CMD ["a","b","c"]'

You get
[a b c]

This patch set makes podman match this behaviour.

Similar change required for Entrypoint.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-17 15:44:50 -04:00
cd952068f3 Validate ENV/LABEL Change options in varlink
If you pass in an invalid CHANGE ENV or LABEL option without the "=" character
podman crashes.

I see that there were other problems with the handling of commit --change handling.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-04-14 05:57:38 -04:00
aef09ce031 Add --include-volumes flag to 'podman commit'
The 'docker commit' will never include a container's volumes when
committing, without an explicit request through '--change'.

Podman, however, defaulted to including user volumes as image
volumes.

Make this behavior depend on a new flag, '--include-volumes',
and make the default behavior match Docker.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-04-11 09:55:24 -04:00
ca1e76ff63 Add event logging to libpod, even display to podman
In lipod, we now log major events that occurr.  These events
can be displayed using the `podman events` command. Each
event contains:

* Type (container, image, volume, pod...)
* Status (create, rm, stop, kill, ....)
* Timestamp in RFC3339Nano format
* Name (if applicable)
* Image (if applicable)

The format of the event and the varlink endpoint are to not
be considered stable until cockpit has done its enablement.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-11 15:08:59 -05:00
ff0b4652ef Vendor Buildah v1.7
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Vendors in Buildah 1.7 into Podman.
Also the latest imagebuilder and changes for
`build --target`

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-02-22 16:40:05 -05:00
9c7d512136 Use sprintf to generate port numbers while committing
Casting integers to strings is definitely not correct, so let the
standard library handle matters.

Fixes 

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-02 10:26:44 -05:00
bfc473f982 Vendor in new new buildah/ci
libpod requires new buildah and container image versions to resolve
bug 

Signed-off-by: baude <bbaude@redhat.com>
2018-10-17 17:04:19 -05:00
92b28a88d8 Vendor in latest containers/buildah
Switch from projectatomic/buildah to containers/buildah

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-18 17:20:30 -04:00
16465007d0 Vendor in latest projectatomic/buildah
Fixes to podman build for unknown image and ADD with url
when doing --layers.

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

Closes: 
Approved by: mheon
2018-08-23 19:11:09 +00:00
d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: 
Approved by: mheon
2018-08-16 17:12:36 +00:00
7bdfb4f9b3 podman: accept option --rootfs to use exploded images
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: 
Approved by: mheon
2018-06-15 14:53:18 +00:00
29c831f9d6 Add OnBuild support for podman build
Only supported for docker formated images. OCI Does not support this flag.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-06-01 10:08:56 -04:00
de13777e71 Make references to the Process part of Spec conditional
The OCI runtime spec does not require Process to be passed (IE,
it can be nil). Make most of our references to it conditional on
it existing.

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: 
Approved by: mheon
2018-05-25 15:32:47 +00:00
ca1c6ef5be honor multiple change values
In the case where changes are made to Env, Expose, Volumes, or labels, we should
honor that multiple values are valid.

Resolves: 

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

Closes: 
Approved by: mheon
2018-05-21 16:13:16 +00:00
d870c25c01 implement varlink commit
Signed-off-by: baude <bbaude@redhat.com>

Closes: 
Approved by: baude
2018-05-15 17:08:10 +00:00
fae5033a01 Make podman commit to localhost rather then docker.io
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: 
Approved by: mheon
2018-05-03 13:12:46 +00:00
ab7e2a6956 Store user Volumes, Entrypoint, Command in database
We need these for commit, and they cannot be properly deduced
from just the OCI spec, so save them in the database so we can
retrieve them for commit.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-05-03 12:23:12 +00:00
f6d41abfb0 Print the Buildah comment from commit to given writer
Much better than unconditionally dumping to stdout

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-05-03 12:00:17 +00:00
25dc483f00 Do not print unnecessary Buildah details during commit
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-05-03 12:00:17 +00:00
9924956dc8 do not commit default volumes from container
when performing a container commit, we should not add the default list of volumes
for a container to the resulting image.  it will cause the resulting image to crash
when run subsequently.

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

Closes: 
Approved by: mheon
2018-04-30 21:07:59 +00:00
a824186ac9 Use buildah commit and bud in podman
Vendor in buildah and use as much of commit and bug as possible for podman
build and commit.

Resolves 
Signed-off-by: baude <bbaude@redhat.com>

Closes: 
Approved by: mheon
2018-04-27 20:51:07 +00:00
27107fdac1 Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed

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

Closes: 
Approved by: baude
2018-04-19 14:08:47 +00:00
6c5ebb0315 Change container.locked to batched
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: 
Approved by: mheon
2018-04-16 15:18:38 +00:00
1700f2b238 Use buildah commit for podman commit
Resolves:  and 
Signed-off-by: baude <bbaude@redhat.com>

Closes: 
Approved by: mheon
2018-04-10 13:31:59 +00:00