Move custom images to separate major component directories

This commit is contained in:
Andrejs Cunskis 2022-05-03 13:52:10 +03:00
parent 0d1e680ecb
commit 8fff315864
No known key found for this signature in database
GPG key ID: 87CB75083F227241
4 changed files with 44 additions and 28 deletions

View file

@ -268,7 +268,6 @@ function print_kubectl_args() {
function parse_arguments() {
printf -- "-f Dockerfile.custom "
# Mapping between sources of architectures
# - arch: a current image architecture (or uname -m if matching host, but can be different)
# - apk --print-arch: a alpine architecture for installed packages
@ -337,14 +336,14 @@ function generate_command() {
function build_custom_if_needed() {
build_image_path=$(get_image_path)
build_image_tag=$(get_image_tag)
echo "Building image $build_image_tag"
full_image_name="$build_image_path:$build_image_tag"
echo "Building image $full_image_name"
docker_command=$(generate_command $@ --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from="$full_image_name" -t "$full_image_name")
echo "Docker command:"
printf "\t%s" "$docker_command"
eval $docker_command
printf "\n\nSUCCESS - Successfully built:\n\t%s" "$build_image_tag"
printf "\n\nSUCCESS - Successfully built:\n\t%s" "$full_image_name"
}
build_custom_if_needed $@

View file

@ -1,5 +1,5 @@
PATH_TOOLS=()
TAG_TOOLS=(DEBIAN RUBY BUNDLER GOLANG GIT LFS CHROME NODE YARN POSTGRESQL GRAPHICSMAGICK PGBOUNCER BAZELISK DOCKER GCLOUD KUBECTL)
PATH_TOOLS=(DEBIAN RUBY GOLANG NODE POSTGRESQL)
TAG_TOOLS=(BUNDLER GIT LFS CHROME YARN GRAPHICSMAGICK PGBOUNCER BAZELISK DOCKER GCLOUD KUBECTL)
function get_image_path() {
local path