Use mirrored buildkit:buildx-stable-1 image
Docker buildx create uses a specific image hosted on Docker Hub by default. Unfortunately, Docker Hub has put in place some fairly restrictive rate limits that have created problems for people. Override the image location when running docker buildx create to pull a mirrored image from quay.io which should mitigate the rate limit issues. Change-Id: I9b9394b89d925a06538db958cf66c86360eefceb
This commit is contained in:
parent
cf97d10b37
commit
55fd4f3b24
@ -7,7 +7,7 @@
|
||||
# step below. More info here:
|
||||
# https://docs.docker.com/reference/cli/docker/buildx/create/#buildkitd-config
|
||||
- name: Create builder
|
||||
command: "docker buildx create --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}"
|
||||
command: "docker buildx create --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver=docker-container --driver-opt image=quay.io/opendevmirror/buildkit:buildx-stable-1 --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}"
|
||||
when: inventory_hostname == ansible_play_hosts[0]
|
||||
|
||||
- name: Add host key to known_hosts
|
||||
@ -16,7 +16,7 @@
|
||||
delegate_to: "{{ ansible_play_hosts[0] }}"
|
||||
|
||||
- name: Append builders from other nodes
|
||||
command: "docker buildx create --append --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %} ssh://{{ ansible_user }}@{{ ansible_host }}"
|
||||
command: "docker buildx create --append --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver-opt image=quay.io/opendevmirror/buildkit:buildx-stable-1 --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %} ssh://{{ ansible_user }}@{{ ansible_host }}"
|
||||
when: inventory_hostname != ansible_play_hosts[0]
|
||||
delegate_to: "{{ ansible_play_hosts[0] }}"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
# step below. More info here:
|
||||
# https://docs.docker.com/reference/cli/docker/buildx/create/#buildkitd-config
|
||||
- name: Create builder
|
||||
command: "docker buildx create --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}"
|
||||
command: "docker buildx create --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver=docker-container --driver-opt image=quay.io/opendevmirror/buildkit:buildx-stable-1 --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %}"
|
||||
environment:
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
when: inventory_hostname == ansible_play_hosts[0]
|
||||
@ -20,7 +20,7 @@
|
||||
delegate_to: "{{ ansible_play_hosts[0] }}"
|
||||
|
||||
- name: Append builders from other nodes
|
||||
command: "docker buildx create --append --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %} ssh://{{ ansible_user }}@{{ ansible_host }}"
|
||||
command: "docker buildx create --append --name mybuilder --node {{ inventory_hostname | replace('-', '_') }} --driver=docker-container --driver-opt image=quay.io/opendevmirror/buildkit:buildx-stable-1 --driver-opt network=host{% if buildset_registry is defined %} --config /etc/buildkit/buildkitd.toml {% endif %} ssh://{{ ansible_user }}@{{ ansible_host }}"
|
||||
environment:
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
when: inventory_hostname != ansible_play_hosts[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user