Remove unneeded parameters.

This commit is contained in:
redxef 2022-08-29 18:01:26 +02:00
parent 3641832ce8
commit 37fabc96ee
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
2 changed files with 2 additions and 21 deletions

View file

@ -7,9 +7,6 @@ Currently only the docker registry is supported.
## 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.
- platform: Optional. A comma seperated list of target platforms, default: current platform
- context: The context with which to build.

View file

@ -47,7 +47,7 @@ split_repo_domain() {
if [ -z "$domain_part" ]; then
domain_part="$DEFAULT_DOMAIN"
other_part="$other_part"
# other_part="$other_part"
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
domain_part="$DEFAULT_DOMAIN"
@ -64,12 +64,6 @@ split_repo_domain() {
}
build() {
if [ -z "$repository" ]; then
fail "missing argument: repository"
fi
if [ -z "$tag" ]; then
tag=latest
fi
if [ -z "$dest" ]; then
fail "missing argument: dest"
fi
@ -82,23 +76,13 @@ build() {
platform="--opt platform=$platform"
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 \
build \
--frontend dockerfile.v0 \
--local context="$context" \
--local dockerfile="$context" \
$platform \
--output type=oci,dest=\"$dest\"
--output type=oci,dest=\""$dest"\"
}
if [ -n "$username" ]; then