Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:6f7d999551dd471b58f70

FROM --platform=$BUILDPLATFORM golang:1.11 AS base
COPY --from=xgo / /
WORKDIR /go/src/github.com/moby/buildkit
WORKDIR /src
ENV GOFLAGS=-mod=vendor

FROM base AS version
ARG CHANNEL
# TODO: PKG should be inferred from go modules
RUN --mount=target=. \
PKG=github.com/moby/buildkit/frontend/dockerfile/cmd/dockerfile-frontend VERSION=$(./frontend/dockerfile/cmd/dockerfile-frontend/hack/detect "$CHANNEL") REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \
echo "-X main.Version=${VERSION} -X main.Revision=${REVISION} -X main.Package=${PKG}" | tee /tmp/.ldflags; \
Expand All @@ -19,6 +21,7 @@ ARG BUILDTAGS=""
ARG TARGETPLATFORM
ENV TARGETPLATFORM=$TARGETPLATFORM
RUN --mount=target=. --mount=type=cache,target=/root/.cache \
--mount=target=/go/pkg/mod,type=cache \
--mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \
CGO_ENABLED=0 go build -o /dockerfile-frontend -ldflags "-d $(cat /tmp/.ldflags)" -tags "$BUILDTAGS netgo static_build osusergo" ./frontend/dockerfile/cmd/dockerfile-frontend && \
file /dockerfile-frontend | grep "statically linked"
Expand All @@ -42,4 +45,4 @@ RUN ./check-daily-outdated $CHANNEL $REPO $DATE /out
FROM scratch AS buildid
COPY --from=buildid-check /out/ /

FROM release
FROM release
81 changes: 81 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
module github.com/moby/buildkit

go 1.11

require (
github.com/BurntSushi/toml v0.3.1
github.com/Microsoft/go-winio v0.4.11
github.com/Microsoft/hcsshim v0.7.9 // indirect
github.com/apache/thrift v0.0.0-20161221203622-b2a4d4ae21c7 // indirect
github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58 // indirect
github.com/containerd/cgroups v0.0.0-20181219155423-39b18af02c41 // indirect
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1
github.com/containerd/containerd v0.0.0-20181221132743-47b328aab791
github.com/containerd/continuity v0.0.0-20181001140422-bd77b46c8352
github.com/containerd/cri v0.0.0-20181012222137-f913714917d2 // indirect
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 // indirect
github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3
github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd // indirect
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 // indirect
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/docker/cli v0.0.0-20190131223713-234462756460
github.com/docker/distribution v0.0.0-20170825220652-30578ca32960
github.com/docker/docker v0.0.0-20180531152204-71cd53e4a197
github.com/docker/docker-credential-helpers v0.6.0 // indirect
github.com/docker/go-connections v0.3.0
github.com/docker/go-events v0.0.0-20170721190031-9461782956ad // indirect
github.com/docker/go-units v0.3.1 // indirect
github.com/docker/libnetwork v0.0.0-20180913200009-36d3bed0e9f4
github.com/godbus/dbus v4.1.0+incompatible // indirect
Copy link
Collaborator Author

@tiborvass tiborvass Jan 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The +incompatible just means that even though the repo is using semver v2+, it doesn't have a go.mod, so go is precautious and treats it as v0 (aka things can break when it updates).

github.com/gofrs/flock v0.7.0
github.com/gogo/googleapis v0.0.0-20180501115203-b23578765ee5
github.com/gogo/protobuf v1.0.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.2.0
github.com/google/go-cmp v0.2.0
github.com/google/shlex v0.0.0-20150127133951-6f45313302b9
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hashicorp/go-immutable-radix v1.0.0
github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880
github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c // indirect
github.com/ishidawataru/sctp v0.0.0-20180213033435-07191f837fed // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c
github.com/onsi/ginkgo v1.7.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2
github.com/opencontainers/image-spec v1.0.1
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f
github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470
github.com/opentracing-contrib/go-stdlib v0.0.0-20171029140428-b1a47cfbdd75
github.com/opentracing/opentracing-go v0.0.0-20171003133519-1361b9cd60be
github.com/pkg/errors v0.8.0
github.com/pkg/profile v1.2.1
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.0.3
github.com/stretchr/testify v1.1.4
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 // indirect
github.com/tonistiigi/fsutil v0.0.0-20181011223333-2862f6bc5ac9
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea
github.com/uber/jaeger-client-go v0.0.0-20180103221425-e02c85f9069e
github.com/uber/jaeger-lib v1.2.1 // indirect
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5
github.com/vishvananda/netlink v1.0.0 // indirect
github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect
go.etcd.io/bbolt v1.3.1-etcd.8
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d
google.golang.org/genproto v0.0.0-20170523043604-d80a6e20e776
google.golang.org/grpc v1.12.0
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gotest.tools v2.1.0+incompatible
)

replace github.com/hashicorp/go-immutable-radix => github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe
Loading