Clean some stuff from runconfig that are cli only…

… or could be in `opts` package. Having `runconfig/opts` and `opts`
doesn't really make sense and make it difficult to know where to put
some code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2016-12-23 20:09:12 +01:00
parent ae76b43227
commit 6726879382
16 changed files with 1786 additions and 31 deletions

View File

@ -11,8 +11,6 @@ import (
"regexp"
"runtime"
"golang.org/x/net/context"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
@ -31,6 +29,7 @@ import (
runconfigopts "github.com/docker/docker/runconfig/opts"
"github.com/docker/go-units"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
type buildOptions struct {
@ -39,7 +38,7 @@ type buildOptions struct {
tags opts.ListOpts
labels opts.ListOpts
buildArgs opts.ListOpts
ulimits *runconfigopts.UlimitOpt
ulimits *opts.UlimitOpt
memory string
memorySwap string
shmSize string
@ -67,9 +66,9 @@ func NewBuildCommand(dockerCli *command.DockerCli) *cobra.Command {
ulimits := make(map[string]*units.Ulimit)
options := buildOptions{
tags: opts.NewListOpts(validateTag),
buildArgs: opts.NewListOpts(runconfigopts.ValidateEnv),
ulimits: runconfigopts.NewUlimitOpt(&ulimits),
labels: opts.NewListOpts(runconfigopts.ValidateEnv),
buildArgs: opts.NewListOpts(opts.ValidateEnv),
ulimits: opts.NewUlimitOpt(&ulimits),
labels: opts.NewListOpts(opts.ValidateEnv),
}
cmd := &cobra.Command{