From 29c831f9d6abf8d650bc7feb63a1e60876238504 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 31 May 2018 12:38:41 -0400 Subject: Add OnBuild support for podman build Only supported for docker formated images. OCI Does not support this flag. Signed-off-by: Daniel J Walsh --- libpod/container_commit.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpod/container_commit.go') diff --git a/libpod/container_commit.go b/libpod/container_commit.go index 8cb04ec1a..2872012b8 100644 --- a/libpod/container_commit.go +++ b/libpod/container_commit.go @@ -24,6 +24,9 @@ type ContainerCommitOptions struct { Changes []string } +// ChangeCmds is the list of valid Changes commands to passed to the Commit call +var ChangeCmds = []string{"CMD", "ENTRYPOINT", "ENV", "EXPOSE", "LABEL", "ONBUILD", "STOPSIGNAL", "USER", "VOLUME", "WORKDIR"} + // Commit commits the changes between a container and its image, creating a new // image func (c *Container) Commit(ctx context.Context, destImage string, options ContainerCommitOptions) (*image.Image, error) { @@ -138,6 +141,8 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai isLabelCleared = true } importBuilder.SetLabel(splitChange[1], splitChange[2]) + case "ONBUILD": + importBuilder.SetOnBuild(splitChange[1]) case "STOPSIGNAL": // No Set StopSignal case "USER": -- cgit v1.2.3-54-g00ecf