pwaller / docker-show-context Goto Github PK
View Code? Open in Web Editor NEWShow where time is wasted during the context upload of `docker build`
License: MIT License
Show where time is wasted during the context upload of `docker build`
License: MIT License
This is ace! Saved me so much head scratching. Thanks ever so much.
I build with
DOCKER_BUILDKIT=1 docker build -f x/Dockerfile .
thus, the Dockerfile ./x/Dockerfile
and the .dockerignore
file ./x/Dockerfile.dockerignore
are used. However, this tool expects .dockerignore
to be at ./.dockerignore
.
Hello, I'm trying to use the latest version of docker-show-context
, but I'm not super familiar with vgo and the new module support in Go. I tried installing vgo
on an older Go version, which failed, and then I upgraded Go and saw that it is now 1.11, so maybe vgo isn't required anymore?
I'm still not really sure what I'm doing, so would it be possible to update the README with this new information?
The README.md says that I should
docker build -t docker-show-context https://github.com/pwaller/docker-show-context.git
This gives me:
$ docker build -t docker-show-context https://github.com/pwaller/docker-show-context.git
unable to prepare context: unable to 'git clone' to temporary context directory: error initializing submodules: usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
: exit status 1
I've tried this in my home directory, a temp directory in my home directory, and /tmp
, just in case there were problems with existing files or permissions in the way. Same results in all three.
Doing go install
as suggested brings up a weird error message:
env GO111MODULE=on go install -v
go: github.com/docker/[email protected]: invalid pseudo-version: version before v0.0.0 would have negative patch number
My go version is:
go version go1.13.4 darwin/amd64
Have you seen this error before? Any clues why it is happening?
Tried to install per instructions and I get the below error.
$ docker build -t docker-show-context https://github.com/pwaller/docker-show-context.git
Sending build context to Docker daemon 14.34kB
Step 1/6 : FROM golang:1.11
---> 343df9d12b7b
Step 2/6 : WORKDIR /app
---> Using cache
---> dedd36445992
Step 3/6 : COPY . .
---> Using cache
---> e1cb62280bc4
Step 4/6 : RUN GO111MODULE=on go install -v
---> Running in 04887e0c3d52
Fetching https://golang.org/x/sys?go-get=1
Fetching https://golang.org/x/crypto?go-get=1
go: finding github.com/docker/go-units v0.3.3
go: finding github.com/containerd/continuity v0.0.0-20180712174259-0377f7d76720
go: finding github.com/sirupsen/logrus v1.0.5
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/opencontainers/image-spec v1.0.1
go: finding github.com/opencontainers/runc v0.1.1
go: finding github.com/opencontainers/go-digest v1.0.0-rc1
go: finding github.com/docker/docker v0.0.0-20180713101209-23f4a3d5091b
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1
go: finding golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8
go: finding golang.org/x/sys v0.0.0-20180709060233-1b2967e3c290
go: downloading github.com/docker/docker v0.0.0-20180713101209-23f4a3d5091b
go: verifying github.com/docker/[email protected]: checksum mismatch
downloaded: h1:hhme0SP6JMmGE8cl77XmEeCHaFUTUIyMcPn+agC95KM=
go.sum: h1:8noDsulyw/gZqsxiUoxFUf19f0H6PFUXoAcT12LRqrA=
The command '/bin/sh -c GO111MODULE=on go install -v' returned a non-zero code: 1
Running Docker for Mac
Otherwise you will always get the top 10 offenders to be things you've already excluded using dockerignore. I would like to hone in on the best choices in dockerignore.
This tool uses package github.com/docker/docker/builder/dockerignore, but that package is deprecated according to its current documentation.
I'd like to be able to view all files included in the context, but it currently only shows 10s.
Since there are already available binary releases, it would be nice to have a Homebrew formula for macOS.
Go 1.10.1, darwin/amd64.
$ go get -v -u github.com/pwaller/docker-show-context
github.com/pwaller/docker-show-context (download)
github.com/docker/docker (download)
unexpected directory layout:
import path: github.com/docker/docker/builder/dockerignore
root: /Users/pwaller/go/src
dir: /Users/pwaller/go/src/github.com/pwaller/docker-show-context/vendor/github.com/docker/docker/builder/dockerignore
expand root: /Users/pwaller/go/src
expand dir: /Users/pwaller/go/src/github.com/pwaller/docker-show-context/vendor/github.com/docker/docker/builder/dockerignore
separator: /
Not sure what's going on here. Not much time to investigate. Help welcomed!
I'd love to be able to download a pre-compiled file from your last release. Could you build and upload to your release page? Thanks
I get the following output when running the instructions on OS X:
github.com/pwaller/docker-show-context (download)
github.com/pwaller/docker-show-context/vendor/github.com/docker/docker (download)
package github.com/pwaller/docker-show-context/vendor/github.com/docker/docker/builder/dockerignore: /Users/********/go/src/github.com/pwaller/docker-show-context/vendor/github.com/docker/docker/.git exists but is not a directory
github.com/pwaller/docker-show-context/vendor/github.com/Sirupsen/logrus (download)
package github.com/pwaller/docker-show-context/vendor/github.com/Sirupsen/logrus: /Users/********/go/src/github.com/pwaller/docker-show-context/vendor/github.com/Sirupsen/logrus/.git exists but is not a directory
github.com/pwaller/docker-show-context/vendor/golang.org/x/net (download)
package github.com/pwaller/docker-show-context/vendor/golang.org/x/net/context: /Users/********/go/src/github.com/pwaller/docker-show-context/vendor/golang.org/x/net/.git exists but is not a directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.