diff --git a/frontend/dockerfile/docs/reference.md b/frontend/dockerfile/docs/reference.md index 1cf73cd242c53..2db0cf7fbcd4c 100644 --- a/frontend/dockerfile/docs/reference.md +++ b/frontend/dockerfile/docs/reference.md @@ -842,7 +842,7 @@ environment variable with the same name. # syntax=docker/dockerfile:1 FROM alpine RUN --mount=type=secret,id=API_KEY,env=API_KEY \ - some-command --token-from-env API_KEY + some-command --token-from-env $API_KEY ``` Assuming that the `API_KEY` environment variable is set in the build diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index ac45ef93f2de2..05381d6fa4185 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -9,6 +9,7 @@ import ( "net" "os" "path/filepath" + "runtime" "strconv" "strings" "sync" @@ -400,11 +401,14 @@ type bindMount struct { } func (b *bindMount) Mount() ([]mount.Mount, func() error, error) { - return []mount.Mount{{ - Type: "bind", - Source: b.dir, - Options: []string{"bind", "ro", "nosuid", "nodev", "noexec"}, - }}, func() error { return nil }, nil + if runtime.GOOS != "windows" { + return []mount.Mount{{ + Type: "bind", + Source: b.dir, + Options: []string{"bind", "ro", "nosuid", "nodev", "noexec"}, + }}, func() error { return nil }, nil + } + return nil, func() error { return nil }, nil } func (b *bindMount) IdentityMapping() *idtools.IdentityMapping { return nil