1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/builder.go
Erik Hollensbe 1ae4c00a19 builder: fix references to jobs in daemon, make builder a first class
package referring to evaluator

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-08-27 18:52:30 -07:00

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{},
}
}