File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ _tag := if _version != '' { "--tag=" + image + ':' + _version } else { "" }
1212
1313k3s-image := ' docker.io/rancher/k3s'
1414
15+ docker_arch := ' '
16+
1517targets := ' go rust rust-musl tools devcontainer'
1618
1719load := ' false'
@@ -35,6 +37,7 @@ build *args='': && _list-if-load
3537 just output=' {{ output }} ' \
3638 image=' {{ image }} ' \
3739 version=' {{ _version }} ' \
40+ docker_arch=' {{ docker_arch }} ' \
3841 _target " $tgt" \
3942 {{ args }}
4043 done
@@ -110,6 +113,7 @@ _target target='' *args='':
110113 output=' {{ output }} ' \
111114 image=' {{ image }} ' \
112115 version=' {{ _version }} ' \
116+ docker_arch=' {{ docker_arch }} ' \
113117 _build --target=' {{ target }} ' \
114118 {{ if _version == ' ' { ' ' } else { ' --tag=' + image + ' :' + _version + if target == ' devcontainer' { ' ' } else { ' -' + target } } }} \
115119 {{ args }}
@@ -119,6 +123,7 @@ _build *args='':
119123 docker buildx build . {{ _tag }} --pull \
120124 - -progress=' {{ DOCKER_PROGRESS }} ' \
121125 - -output=' {{ output }} ' \
126+ {{ if docker_arch != ' ' { ' --platform=' + docker_arch } else { ' ' } }} \
122127 {{ args }}
123128
124129
You can’t perform that action at this time.
0 commit comments