GithubHelp home page GithubHelp logo

pwaller / docker-show-context Goto Github PK

View Code? Open in Web Editor NEW
322.0 4.0 15.0 32 KB

Show where time is wasted during the context upload of `docker build`

License: MIT License

Go 95.99% Dockerfile 4.01%

docker-show-context's People

Contributors

akx avatar pwaller avatar sanfilippopablo avatar shaderecker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-show-context's Issues

Allow specifying location of .dockerignore

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.

Go 1.11 was released with module support

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?

Docker build in the README fails

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.

go install fails with "invalid pseudo-version"

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?

install failed with [email protected]: checksum mismatch

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

Homebrew formula

Since there are already available binary releases, it would be nice to have a Homebrew formula for macOS.

"unexpected directory layout" during go get

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!

Build binaries for last release

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

Setup instructions not working

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.