Remove unneeded parameters.
This commit is contained in:
parent
3641832ce8
commit
37fabc96ee
2 changed files with 2 additions and 21 deletions
|
@ -7,9 +7,6 @@ Currently only the docker registry is supported.
|
||||||
|
|
||||||
## parameters
|
## parameters
|
||||||
|
|
||||||
- repository: Required. The repository of the image.
|
|
||||||
- tag: Optional. The tag for the image, default: `latest`
|
|
||||||
- additional_tags: Optional. Path to a file containing one additional tag per line.
|
|
||||||
- dest: Required. The output path for the oci image.
|
- dest: Required. The output path for the oci image.
|
||||||
- platform: Optional. A comma seperated list of target platforms, default: current platform
|
- platform: Optional. A comma seperated list of target platforms, default: current platform
|
||||||
- context: The context with which to build.
|
- context: The context with which to build.
|
||||||
|
|
|
@ -47,7 +47,7 @@ split_repo_domain() {
|
||||||
|
|
||||||
if [ -z "$domain_part" ]; then
|
if [ -z "$domain_part" ]; then
|
||||||
domain_part="$DEFAULT_DOMAIN"
|
domain_part="$DEFAULT_DOMAIN"
|
||||||
other_part="$other_part"
|
# other_part="$other_part"
|
||||||
elif echo "$domain_part" | grep -Evq '\.|:' && [ "$domain_part" != 'localhost' ]; then
|
elif echo "$domain_part" | grep -Evq '\.|:' && [ "$domain_part" != 'localhost' ]; then
|
||||||
# ^ docker sourcecode checks if $domain_part == $domain_part.lower() in effect checking if all is lower case
|
# ^ docker sourcecode checks if $domain_part == $domain_part.lower() in effect checking if all is lower case
|
||||||
domain_part="$DEFAULT_DOMAIN"
|
domain_part="$DEFAULT_DOMAIN"
|
||||||
|
@ -64,12 +64,6 @@ split_repo_domain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ -z "$repository" ]; then
|
|
||||||
fail "missing argument: repository"
|
|
||||||
fi
|
|
||||||
if [ -z "$tag" ]; then
|
|
||||||
tag=latest
|
|
||||||
fi
|
|
||||||
if [ -z "$dest" ]; then
|
if [ -z "$dest" ]; then
|
||||||
fail "missing argument: dest"
|
fail "missing argument: dest"
|
||||||
fi
|
fi
|
||||||
|
@ -82,23 +76,13 @@ build() {
|
||||||
platform="--opt platform=$platform"
|
platform="--opt platform=$platform"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
final_tag="$repository:$tag"
|
|
||||||
if [ -n "$additional_tags" ]; then
|
|
||||||
while read -r line; do
|
|
||||||
if [ -z "$line" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
final_tag="$repository:$line,$final_tag"
|
|
||||||
done < "$additional_tags"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo_and_run buildctl-daemonless.sh \
|
echo_and_run buildctl-daemonless.sh \
|
||||||
build \
|
build \
|
||||||
--frontend dockerfile.v0 \
|
--frontend dockerfile.v0 \
|
||||||
--local context="$context" \
|
--local context="$context" \
|
||||||
--local dockerfile="$context" \
|
--local dockerfile="$context" \
|
||||||
$platform \
|
$platform \
|
||||||
--output type=oci,dest=\"$dest\"
|
--output type=oci,dest=\""$dest"\"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$username" ]; then
|
if [ -n "$username" ]; then
|
||||||
|
|
Reference in a new issue