summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/infra/abi/containers.go')
-rw-r--r--pkg/domain/infra/abi/containers.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index d2c8aefdc..da9be0946 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -511,9 +511,14 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerCreate(ctx context.Context, s *specgen.SpecGenerator) (*entities.ContainerCreateReport, error) {
- if err := generate.CompleteSpec(ctx, ic.Libpod, s); err != nil {
+ warn, err := generate.CompleteSpec(ctx, ic.Libpod, s)
+ if err != nil {
return nil, err
}
+ // Print warnings
+ for _, w := range warn {
+ fmt.Fprintf(os.Stderr, "%s\n", w)
+ }
ctr, err := generate.MakeContainer(ctx, ic.Libpod, s)
if err != nil {
return nil, err
@@ -773,9 +778,14 @@ func (ic *ContainerEngine) ContainerDiff(ctx context.Context, nameOrID string, o
}
func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.ContainerRunOptions) (*entities.ContainerRunReport, error) {
- if err := generate.CompleteSpec(ctx, ic.Libpod, opts.Spec); err != nil {
+ warn, err := generate.CompleteSpec(ctx, ic.Libpod, opts.Spec)
+ if err != nil {
return nil, err
}
+ // Print warnings
+ for _, w := range warn {
+ fmt.Fprintf(os.Stderr, "%s\n", w)
+ }
ctr, err := generate.MakeContainer(ctx, ic.Libpod, opts.Spec)
if err != nil {
return nil, err