mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move builder files to builder/dockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
aac5c44c10
commit
f41230b93a
75 changed files with 26 additions and 26 deletions
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/docker/docker/api/server/httputils"
|
"github.com/docker/docker/api/server/httputils"
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/builder"
|
"github.com/docker/docker/builder/dockerfile"
|
||||||
"github.com/docker/docker/cliconfig"
|
"github.com/docker/docker/cliconfig"
|
||||||
"github.com/docker/docker/graph"
|
"github.com/docker/docker/graph"
|
||||||
"github.com/docker/docker/pkg/ioutils"
|
"github.com/docker/docker/pkg/ioutils"
|
||||||
|
@ -46,7 +46,7 @@ func (s *router) postCommit(ctx context.Context, w http.ResponseWriter, r *http.
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
commitCfg := &builder.CommitConfig{
|
commitCfg := &dockerfile.CommitConfig{
|
||||||
Pause: pause,
|
Pause: pause,
|
||||||
Repo: r.Form.Get("repo"),
|
Repo: r.Form.Get("repo"),
|
||||||
Tag: r.Form.Get("tag"),
|
Tag: r.Form.Get("tag"),
|
||||||
|
@ -56,7 +56,7 @@ func (s *router) postCommit(ctx context.Context, w http.ResponseWriter, r *http.
|
||||||
Config: c,
|
Config: c,
|
||||||
}
|
}
|
||||||
|
|
||||||
imgID, err := builder.Commit(cname, s.daemon, commitCfg)
|
imgID, err := dockerfile.Commit(cname, s.daemon, commitCfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ func (s *router) postImagesCreate(ctx context.Context, w http.ResponseWriter, r
|
||||||
// generated from the download to be available to the output
|
// generated from the download to be available to the output
|
||||||
// stream processing below
|
// stream processing below
|
||||||
var newConfig *runconfig.Config
|
var newConfig *runconfig.Config
|
||||||
newConfig, err = builder.BuildFromConfig(s.daemon, &runconfig.Config{}, r.Form["changes"])
|
newConfig, err = dockerfile.BuildFromConfig(s.daemon, &runconfig.Config{}, r.Form["changes"])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ func (s *router) postBuild(ctx context.Context, w http.ResponseWriter, r *http.R
|
||||||
var (
|
var (
|
||||||
authConfigs = map[string]cliconfig.AuthConfig{}
|
authConfigs = map[string]cliconfig.AuthConfig{}
|
||||||
authConfigsEncoded = r.Header.Get("X-Registry-Config")
|
authConfigsEncoded = r.Header.Get("X-Registry-Config")
|
||||||
buildConfig = builder.NewBuildConfig()
|
buildConfig = dockerfile.NewBuildConfig()
|
||||||
)
|
)
|
||||||
|
|
||||||
if authConfigsEncoded != "" {
|
if authConfigsEncoded != "" {
|
||||||
|
@ -347,7 +347,7 @@ func (s *router) postBuild(ctx context.Context, w http.ResponseWriter, r *http.R
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := builder.Build(s.daemon, buildConfig); err != nil {
|
if err := dockerfile.Build(s.daemon, buildConfig); err != nil {
|
||||||
// Do not write the error in the http output if it's still empty.
|
// Do not write the error in the http output if it's still empty.
|
||||||
// This prevents from writing a 200(OK) when there is an interal error.
|
// This prevents from writing a 200(OK) when there is an interal error.
|
||||||
if !output.Flushed() {
|
if !output.Flushed() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
// This file contains the dispatchers for each command. Note that
|
// This file contains the dispatchers for each command. Note that
|
||||||
// `nullDispatch` is not actually a command, but support for commands we parse
|
// `nullDispatch` is not actually a command, but support for commands we parse
|
|
@ -1,4 +1,4 @@
|
||||||
// Package builder is the evaluation step in the Dockerfile parse/evaluate pipeline.
|
// Package dockerfile is the evaluation step in the Dockerfile parse/evaluate pipeline.
|
||||||
//
|
//
|
||||||
// It incorporates a dispatch table based on the parser.Node values (see the
|
// It incorporates a dispatch table based on the parser.Node values (see the
|
||||||
// parser package for more information) that are yielded from the parser itself.
|
// parser package for more information) that are yielded from the parser itself.
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
// before and after each step, such as creating an image ID and removing temporary
|
// before and after each step, such as creating an image ID and removing temporary
|
||||||
// containers and images. Note that ONBUILD creates a kinda-sorta "sub run" which
|
// containers and images. Note that ONBUILD creates a kinda-sorta "sub run" which
|
||||||
// includes its own set of steps (usually only one of them).
|
// includes its own set of steps (usually only one of them).
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -29,8 +29,8 @@ import (
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/docker/docker/api"
|
"github.com/docker/docker/api"
|
||||||
"github.com/docker/docker/builder/command"
|
"github.com/docker/docker/builder/dockerfile/command"
|
||||||
"github.com/docker/docker/builder/parser"
|
"github.com/docker/docker/builder/dockerfile/parser"
|
||||||
"github.com/docker/docker/cliconfig"
|
"github.com/docker/docker/cliconfig"
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
"github.com/docker/docker/pkg/fileutils"
|
"github.com/docker/docker/pkg/fileutils"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
// internals for handling commands. Covers many areas and a lot of
|
// internals for handling commands. Covers many areas and a lot of
|
||||||
// non-contiguous functionality. Please read the comments.
|
// non-contiguous functionality. Please read the comments.
|
||||||
|
@ -19,7 +19,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/docker/docker/builder/parser"
|
"github.com/docker/docker/builder/dockerfile/parser"
|
||||||
"github.com/docker/docker/cliconfig"
|
"github.com/docker/docker/cliconfig"
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
"github.com/docker/docker/graph"
|
"github.com/docker/docker/graph"
|
|
@ -1,6 +1,6 @@
|
||||||
// +build freebsd linux
|
// +build freebsd linux
|
||||||
|
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
|
@ -1,6 +1,6 @@
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -12,7 +12,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/docker/docker/api"
|
"github.com/docker/docker/api"
|
||||||
"github.com/docker/docker/builder/parser"
|
"github.com/docker/docker/builder/dockerfile/parser"
|
||||||
"github.com/docker/docker/cliconfig"
|
"github.com/docker/docker/cliconfig"
|
||||||
"github.com/docker/docker/daemon"
|
"github.com/docker/docker/daemon"
|
||||||
"github.com/docker/docker/graph/tags"
|
"github.com/docker/docker/graph/tags"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/docker/docker/builder/command"
|
"github.com/docker/docker/builder/dockerfile/command"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Node is a structure used to represent a parse tree.
|
// Node is a structure used to represent a parse tree.
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
// This will take a single word and an array of env variables and
|
// This will take a single word and an array of env variables and
|
||||||
// process all quotes (" and ') as well as $xxx and ${xxx} env variable
|
// process all quotes (" and ') as well as $xxx and ${xxx} env variable
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"regexp"
|
"regexp"
|
|
@ -1,4 +1,4 @@
|
||||||
package builder
|
package dockerfile
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/builder/command"
|
"github.com/docker/docker/builder/dockerfile/command"
|
||||||
"github.com/docker/docker/pkg/archive"
|
"github.com/docker/docker/pkg/archive"
|
||||||
"github.com/docker/docker/pkg/stringutils"
|
"github.com/docker/docker/pkg/stringutils"
|
||||||
"github.com/go-check/check"
|
"github.com/go-check/check"
|
||||||
|
|
Loading…
Add table
Reference in a new issue