Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize docker requests for local builds #34

Merged
merged 2 commits into from
Jul 13, 2023

Commits on Jul 11, 2023

  1. Skip manifest query for intermediate build stages

    This removes unnecessary queries to the registry for intermediate
    stage images in the dockerfile. Querying the registry for these images
    would fail in the best case or could cause false positives in the worst
    case.
    
    This commit adds an additional filter during parsing of the dockerfile
    to remove any intermediate stages from the query list.
    
    Change-type: patch
    pipex committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    d5ad39b View commit details
    Browse the repository at this point in the history
  2. Remove cachefrom from pull options

    This option is not used by the [Docker
    API](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageCreate).
    
    As the cache can get really big, depending on how the cache list is
    obtained, this may mean sending a huge query string over the local
    network. There is good evidence to suggest that this could be the cause of
    balena-io/balena-cli#2165, which would cause the query string to over
    the 1MB limit set by [Golang's net/http server](https://pkg.go.dev/net/http#Server).
    
    Change-type: patch
    pipex committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    babd410 View commit details
    Browse the repository at this point in the history