Skip to content

Commit e570d60

Browse files
committed
feat(justfile): allow passing in additional docker args to build
1 parent 271cf42 commit e570d60

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

justfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ export DOCKER_PROGRESS := env_var_or_default('DOCKER_PROGRESS', 'auto')
2828

2929
all: sync-k3s-images build
3030

31-
build: && _list-if-load
31+
build *args='': && _list-if-load
3232
#!/usr/bin/env bash
3333
set -euo pipefail
3434
for tgt in {{ targets }} ; do
3535
just output='{{ output }}' \
3636
image='{{ image }}' \
3737
version='{{ _version }}' \
38-
_target "$tgt"
38+
_target "$tgt" \
39+
{{ args }}
3940
done
4041

4142
_list-if-load:
@@ -104,13 +105,14 @@ _k3s-channels:
104105
| {key:.id, value:$tag}
105106
] | from_entries'
106107

107-
_target target='':
108+
_target target='' *args='':
108109
@just \
109110
output='{{ output }}' \
110111
image='{{ image }}' \
111112
version='{{ _version }}' \
112113
_build --target='{{ target }}' \
113-
{{ if _version == '' { '' } else { '--tag=' + image + ':' + _version + if target == 'devcontainer' { '' } else { '-' + target } } }}
114+
{{ if _version == '' { '' } else { '--tag=' + image + ':' + _version + if target == 'devcontainer' { '' } else { '-' + target } } }} \
115+
{{ args }}
114116

115117
# Build the devcontainer image
116118
_build *args='':

0 commit comments

Comments
 (0)