Skip to content

feat: handle mirror url with path#3427

Merged
tonistiigi merged 2 commits intomoby:masterfrom
JordanGoasdoue:chore-allow-mirror-path
Dec 20, 2022
Merged

feat: handle mirror url with path#3427
tonistiigi merged 2 commits intomoby:masterfrom
JordanGoasdoue:chore-allow-mirror-path

Conversation

@JordanGoasdoue
Copy link
Contributor

@JordanGoasdoue JordanGoasdoue commented Dec 19, 2022

Allow the use of mirror registry such as Harbor in buildkit with the possibility to have one registry host and multiple proxy_cache projects inside

example:
buildkit side:

[registry."docker.io"]
mirrors = ["core.harbor.domain/proxy.docker.io"]
[registry."quay.io"]
mirrors = ["core.harbor.domain/proxy.quay.io"]

harbor side:

proxy_cache projects named:
- proxy.docker.io (configured for hub.docker.io endpoint)
- proxy.quay.io (configured for quay.io endpoint)

Let's take this Dockerfile to be built by buildkit:

FROM ubuntu:22.04

RUN echo test

With the mirror configuration above, buildkit will pull ubuntu:22.04 from core.harbor.domain/proxy.docker.io/library/ubuntu:22.04

@JordanGoasdoue JordanGoasdoue force-pushed the chore-allow-mirror-path branch from 10067f5 to 6be743d Compare December 19, 2022 16:29
@JordanGoasdoue JordanGoasdoue changed the title chore: handle mirror url with path feat: handle mirror url with path Dec 19, 2022
@tonistiigi
Copy link
Member

@JordanGoasdoue PTAL the windows CI error

@JordanGoasdoue JordanGoasdoue force-pushed the chore-allow-mirror-path branch 7 times, most recently from 1e23101 to f4bf4f0 Compare December 20, 2022 10:20
@JordanGoasdoue JordanGoasdoue force-pushed the chore-allow-mirror-path branch from f4bf4f0 to e662e1d Compare December 20, 2022 10:22
@JordanGoasdoue
Copy link
Contributor Author

@tonistiigi thanks for the review, should be good now after i've replaced filepath.Join() which is OS aware, with path.Join() instead 👍

@JordanGoasdoue JordanGoasdoue force-pushed the chore-allow-mirror-path branch from e621319 to 7f67670 Compare December 20, 2022 14:49
@tonistiigi tonistiigi merged commit f5551cc into moby:master Dec 20, 2022
@JordanGoasdoue JordanGoasdoue deleted the chore-allow-mirror-path branch December 20, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants