moby / moby/buildkit

`httpProxy` support

Open
#971 10 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs/maintainer-decision
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
50

Description

I'm running docker in a network with http proxy which is configured to be used in docker using proxies.default.httpProxy configuration directive.

It works fine with the default docker.

When I enable buildkit the networking operations fails with

 > [2/2] RUN apt update && apt install -y --no-install-recommends zip:
#7 0.383 
#7 0.383 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#7 0.383 
#7 0.657 Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
#7 0.657   Could not resolve 'cache.org.tld'
#7 0.913 Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
#7 0.913   Could not resolve 'cache.org.tld'
#7 0.913 Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
#7 0.913   Could not resolve 'cache.org.tld'
#7 0.913 Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
#7 0.913   Could not resolve 'cache.org.tld'
#7 0.921 Reading package lists...

cache.org.tld' (redacted) is a valid hostname, resolvable by LAN DNS.

I tried to specify dns servers additionally in the /etc/docker/daemon.json, it does not change the outcome though.

A Dockerfile for the output above:

# syntax = docker/dockerfile:1.0-experimental
FROM ubuntu:bionic as base

RUN apt update && apt install -y --no-install-recommends zip

Is it

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Dockerfile and the interaction between BuildKit and Docker's proxies.default.httpProxy setting. Reproduce the failed apt update with the shown Ubuntu image, compare it with the daemon.json DNS configuration, and define done as networking through the configured HTTP proxy working when BuildKit is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile
Domain
build-system, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.