mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
1ae4c00a19
package referring to evaluator Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
34 lines
890 B
Go
34 lines
890 B
Go
package builder
|
|
|
|
import (
|
|
"github.com/docker/docker/builder/evaluator"
|
|
"github.com/docker/docker/nat"
|
|
"github.com/docker/docker/runconfig"
|
|
)
|
|
|
|
// Create a new builder.
|
|
func NewBuilder(opts *evaluator.BuildOpts) *evaluator.BuildFile {
|
|
return &evaluator.BuildFile{
|
|
Dockerfile: nil,
|
|
Env: evaluator.EnvMap{},
|
|
Config: initRunConfig(),
|
|
Options: opts,
|
|
TmpContainers: evaluator.UniqueMap{},
|
|
TmpImages: evaluator.UniqueMap{},
|
|
}
|
|
}
|
|
|
|
func initRunConfig() *runconfig.Config {
|
|
return &runconfig.Config{
|
|
PortSpecs: []string{},
|
|
// FIXME(erikh) this should be a type that lives in runconfig
|
|
ExposedPorts: map[nat.Port]struct{}{},
|
|
Env: []string{},
|
|
Cmd: []string{},
|
|
|
|
// FIXME(erikh) this should also be a type in runconfig
|
|
Volumes: map[string]struct{}{},
|
|
Entrypoint: []string{"/bin/sh", "-c"},
|
|
OnBuild: []string{},
|
|
}
|
|
}
|