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

Specify custom config for buildx #66

Closed
GMartinez-Sisti opened this issue Apr 21, 2021 · 4 comments · Fixed by #67
Closed

Specify custom config for buildx #66

GMartinez-Sisti opened this issue Apr 21, 2021 · 4 comments · Fixed by #67

Comments

@GMartinez-Sisti
Copy link
Contributor

Hi, I've been trying to use a custom config with the following syntax:

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v1
        with:
          version: latest
          buildkitd-flags: --config /etc/buildkit/buildkitd.toml
$ cat /etc/buildkit/buildkitd.toml
[registry."docker.io"]
    mirrors = ["nexus.internal.domain"]

The docker config also uses the same registry and I can see that the buildx image is pulled from the configured mirror, but images used by buildx are not respecting the configuration and going straight to Docker Hub. Initially I tried to use the variable DOCKER_CONFIG but looks like it's only used to specify the plugin directory here.

Using the configuration locally works with:

docker buildx create --config /etc/buildkit/buildkitd.toml --use

I'd like to avoid specifying the configuration as arguments to prevent having to change all the workflows every time something changes. Is this feature supported by this action?

(Initial report -> docker/buildx#136)

Thanks

@crazy-max
Copy link
Member

@GMartinez-Sisti

Is this feature supported by this action?

Sure LGTM

@GMartinez-Sisti
Copy link
Contributor Author

@crazy-max I can send a PR with a new input named config, just not sure how to test it.

@crazy-max
Copy link
Member

@GMartinez-Sisti

just not sure how to test it.

I think we could use a docker hub mirror (like mirror.gcr.io one) to test the behavior for your case. Will let you know.

@crazy-max
Copy link
Member

@GMartinez-Sisti Ok feel free to open a PR. We will discuss how to include a test on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants