How to use HTTP header with ADD command

Open
#4,229 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker, dockerfile
Domain
build-system

Research direction

Start with the Dockerfile ADD behavior and the ARG/token examples in the issue, then compare them with the shown curl command using an Authorization header. Verify whether ADD can accept custom HTTP headers; done means establishing a supported approach and documenting or scoping the required change.

Written by the indexing model from the issue text.

Description

area/dockerfile kind/enhancement

In light of the Github API changes:
https://developer.github.com/changes/2/ (https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/)

this won't really work in the near future:

ARG token
ADD "<url>?access_token=$token"  .

instead we are gonna have to do:

RUN curl -H "Authorization: token $token" "url"  >  bar

is there a way to use a header with ADD or should we just use curl?

Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

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.

More from moby/buildkit

All issues in moby/buildkit

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.