Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
| ... | ... |
@@ -26,7 +26,7 @@ github.com/imdario/mergo v0.3.6 |
| 26 | 26 |
golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca |
| 27 | 27 |
|
| 28 | 28 |
# buildkit |
| 29 |
-github.com/moby/buildkit 8cf9bec86a7f11fe6591804aee152c8e8a7a8a0d # v0.3.3 |
|
| 29 |
+github.com/moby/buildkit d9f75920678e35090025bb89344c5370e2efc8e7 |
|
| 30 | 30 |
github.com/tonistiigi/fsutil 2862f6bc5ac9b97124e552a5c108230b38a1b0ca |
| 31 | 31 |
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 |
| 32 | 32 |
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 |
| ... | ... |
@@ -145,13 +145,13 @@ build-using-dockerfile -t mybuildkit -f ./hack/dockerfiles/test.Dockerfile . |
| 145 | 145 |
docker inspect myimage |
| 146 | 146 |
``` |
| 147 | 147 |
|
| 148 |
-##### Building a Dockerfile using [external frontend](https://hub.docker.com/r/tonistiigi/dockerfile/tags/): |
|
| 148 |
+##### Building a Dockerfile using [external frontend](https://hub.docker.com/r/docker/dockerfile/tags/): |
|
| 149 | 149 |
|
| 150 |
-During development, an external version of the Dockerfile frontend is pushed to https://hub.docker.com/r/tonistiigi/dockerfile that can be used with the gateway frontend. The source for the external frontend is currently located in `./frontend/dockerfile/cmd/dockerfile-frontend` but will move out of this repository in the future ([#163](https://github.com/moby/buildkit/issues/163)). For automatic build from master branch of this repository `tonistiigi/dockerfile:master` image can be used. |
|
| 150 |
+External versions of the Dockerfile frontend are pushed to https://hub.docker.com/r/docker/dockerfile-upstream and https://hub.docker.com/r/docker/dockerfile and can be used with the gateway frontend. The source for the external frontend is currently located in `./frontend/dockerfile/cmd/dockerfile-frontend` but will move out of this repository in the future ([#163](https://github.com/moby/buildkit/issues/163)). For automatic build from master branch of this repository `docker/dockerfile-upsteam:master` or `docker/dockerfile-upstream:master-experimental` image can be used. |
|
| 151 | 151 |
|
| 152 | 152 |
``` |
| 153 |
-buildctl build --frontend=gateway.v0 --frontend-opt=source=tonistiigi/dockerfile --local context=. --local dockerfile=. |
|
| 154 |
-buildctl build --frontend gateway.v0 --frontend-opt=source=tonistiigi/dockerfile --frontend-opt=context=git://github.com/moby/moby --frontend-opt build-arg:APT_MIRROR=cdn-fastly.deb.debian.org |
|
| 153 |
+buildctl build --frontend=gateway.v0 --frontend-opt=source=docker/dockerfile --local context=. --local dockerfile=. |
|
| 154 |
+buildctl build --frontend gateway.v0 --frontend-opt=source=docker/dockerfile --frontend-opt=context=git://github.com/moby/moby --frontend-opt build-arg:APT_MIRROR=cdn-fastly.deb.debian.org |
|
| 155 | 155 |
```` |
| 156 | 156 |
|
| 157 | 157 |
##### Building a Dockerfile with experimental features like `RUN --mount=type=(bind|cache|tmpfs|secret|ssh)` |
| ... | ... |
@@ -44,7 +44,8 @@ func GenerateSpec(ctx context.Context, meta executor.Meta, mounts []executor.Mou |
| 44 | 44 |
s.Process.Args = meta.Args |
| 45 | 45 |
s.Process.Env = meta.Env |
| 46 | 46 |
s.Process.Cwd = meta.Cwd |
| 47 |
- s.Process.Rlimits = nil // reset open files limit |
|
| 47 |
+ s.Process.Rlimits = nil // reset open files limit |
|
| 48 |
+ s.Process.NoNewPrivileges = false // reset nonewprivileges |
|
| 48 | 49 |
s.Hostname = "buildkitsandbox" |
| 49 | 50 |
|
| 50 | 51 |
s.Mounts = GetMounts(ctx, |
| ... | ... |
@@ -250,7 +250,6 @@ func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, |
| 250 | 250 |
} |
| 251 | 251 |
} |
| 252 | 252 |
d.stage.BaseName = ref.String() |
| 253 |
- _ = ref |
|
| 254 | 253 |
if len(img.RootFS.DiffIDs) == 0 {
|
| 255 | 254 |
isScratch = true |
| 256 | 255 |
// schema1 images can't return diffIDs so double check :( |
| ... | ... |
@@ -89,7 +89,6 @@ func New(req Request) *Pipe {
|
| 89 | 89 |
roundTripCh := &channel{}
|
| 90 | 90 |
pw := &sender{
|
| 91 | 91 |
req: req, |
| 92 |
- recvChannel: cancelCh, |
|
| 93 | 92 |
sendChannel: roundTripCh, |
| 94 | 93 |
} |
| 95 | 94 |
pr := &receiver{
|
| ... | ... |
@@ -125,7 +124,6 @@ func New(req Request) *Pipe {
|
| 125 | 125 |
type sender struct {
|
| 126 | 126 |
status Status |
| 127 | 127 |
req Request |
| 128 |
- recvChannel *channel |
|
| 129 | 128 |
sendChannel *channel |
| 130 | 129 |
mu sync.Mutex |
| 131 | 130 |
} |
| ... | ... |
@@ -37,17 +37,20 @@ type gitSource struct {
|
| 37 | 37 |
locker *locker.Locker |
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 |
+// Supported returns nil if the system supports Git source |
|
| 41 |
+func Supported() error {
|
|
| 42 |
+ if err := exec.Command("git", "version").Run(); err != nil {
|
|
| 43 |
+ return errors.Wrap(err, "failed to find git binary") |
|
| 44 |
+ } |
|
| 45 |
+ return nil |
|
| 46 |
+} |
|
| 47 |
+ |
|
| 40 | 48 |
func NewSource(opt Opt) (source.Source, error) {
|
| 41 | 49 |
gs := &gitSource{
|
| 42 | 50 |
md: opt.MetadataStore, |
| 43 | 51 |
cache: opt.CacheAccessor, |
| 44 | 52 |
locker: locker.New(), |
| 45 | 53 |
} |
| 46 |
- |
|
| 47 |
- if err := exec.Command("git", "version").Run(); err != nil {
|
|
| 48 |
- return nil, errors.Wrap(err, "failed to find git binary") |
|
| 49 |
- } |
|
| 50 |
- |
|
| 51 | 54 |
return gs, nil |
| 52 | 55 |
} |
| 53 | 56 |
|