concourse / concourse/docker-image-resource
Docker save on private registry saves port in repository
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 162
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
I am building a docker image from a Dockerfile that has a FROM <private_repository>. To do this I have the following pipeline:
resources:
- name: repo
type: git
source:
uri: <repo>
branch: {{git-branch}}
private_key: {{private-github-key}}
- name: child
type: docker-image
source:
repository: <docker-internal>:443/child
username: {{docker-username}}
password: {{docker-password}}
- name: base
type: docker-image
source:
repository: <docker-internal>:443/base
username: {{docker-username}}
password: {{docker-password}}
jobs:
- name: build-image-from-base
plan:
- get: repo
- get: base
params:
save: true
- put: child
params:
build: repo/ci
load_base: base
With a Dockerfile for child:
FROM <docker-internal>:443/base
# ...
Problem is that FROM image has to include port :443 which causes issue no basic auth credentials if you try to build the Dockerfile from outside of concourse. If I change to FROM <docker-internal>/base as normal, then error occurs in the pipeline: unauthorized: authentication required.
Is there a way I can configure my pipeline so that I can keep FROM <docker-internal>/base in my image? My concern is that my configuration of docker will be too coupled with concourse if I have to keep it as is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pipeline configuration, the Dockerfile, and the docker-image resource behavior for the saved base image and registry authentication. Reproduce the difference between FROM <docker-internal>:443/base and FROM <docker-internal>/base; done means the pipeline can use the port-free image reference without breaking authentication outside Concourse.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100