From 2cfc902d2966e236fe2c32855b6bbbe49de2b343 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 25 Jul 2013 15:18:34 +0000 Subject: [PATCH] ensure mount in commit Upstream-commit: f385f1860bdebe2434bb122bd5ac8fec85687970 Component: engine --- components/engine/builder.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/engine/builder.go b/components/engine/builder.go index ab07233cb8..420370b1e6 100644 --- a/components/engine/builder.go +++ b/components/engine/builder.go @@ -124,6 +124,10 @@ func (builder *Builder) Create(config *Config) (*Container, error) { func (builder *Builder) Commit(container *Container, repository, tag, comment, author string, config *Config) (*Image, error) { // FIXME: freeze the container before copying it to avoid data corruption? // FIXME: this shouldn't be in commands. + if err := container.EnsureMounted(); err != nil { + return nil, err + } + rwTar, err := container.ExportRw() if err != nil { return nil, err