From 37fabc96eecb8e7c6d14a31b310624626b4a02ee Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 29 Aug 2022 18:01:26 +0200 Subject: [PATCH] Remove unneeded parameters. --- README.md | 3 --- entrypoint.sh | 20 ++------------------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 136dcfe..02fa6f4 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/entrypoint.sh b/entrypoint.sh index 8ac19e7..95bc3fc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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