llb: add const for root mount
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-18.09
parent
2bb4c5d487
commit
bcb950915b
|
@ -3,6 +3,7 @@ package llb
|
|||
import (
|
||||
_ "crypto/sha256"
|
||||
|
||||
"github.com/moby/buildkit/solver/pb"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
@ -48,7 +49,7 @@ func (s *State) Run(opts ...RunOption) *ExecState {
|
|||
meta: meta,
|
||||
mounts: []*mount{},
|
||||
root: &mount{
|
||||
dest: "/",
|
||||
dest: pb.RootMount,
|
||||
source: s.source,
|
||||
parent: s.mount,
|
||||
hasOutput: true,
|
||||
|
|
|
@ -85,7 +85,7 @@ func (e *execOp) Run(ctx context.Context, inputs []Reference) ([]Reference, erro
|
|||
outputs = append(outputs, active)
|
||||
mountable = active
|
||||
}
|
||||
if m.Dest == "/" {
|
||||
if m.Dest == pb.RootMount {
|
||||
root = mountable
|
||||
} else {
|
||||
mounts = append(mounts, worker.Mount{Src: mountable, Dest: m.Dest})
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
package pb
|
||||
|
||||
const RootMount = "/"
|
Loading…
Reference in New Issue