summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-06-01 12:59:47 -0400
committerGitHub <noreply@github.com>2018-06-01 12:59:47 -0400
commit3c63a48bb8c1bdff688ce5b6c9c6e3079370e603 (patch)
treed098f85f80fb364e0d8b082ecd1f898cfde2c186 /libpod
parent10d440a1c898aac84198c9c34d48d0cea9085f68 (diff)
parent29c831f9d6abf8d650bc7feb63a1e60876238504 (diff)
downloadpodman-3c63a48bb8c1bdff688ce5b6c9c6e3079370e603.tar.gz
podman-3c63a48bb8c1bdff688ce5b6c9c6e3079370e603.tar.bz2
podman-3c63a48bb8c1bdff688ce5b6c9c6e3079370e603.zip
Merge pull request #859 from rhatdan/onbuild
Add OnBuild support for podman build
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_commit.go5
1 files changed, 5 insertions, 0 deletions
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":