mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-08-26 18:35:58 +00:00
Add tag for httpd, mariadb, memcached
and nginx, postgres, ... Two tags are to be added for each containers. 1. exact app version tag, usually format as x.y.z. For example, 5.0.6 for redis. 2. major app version tag, usually format as x. For example, 5 for redis. For some special cases, the major format as x.y. For example, 1.17 for nginx, 3.7 for python. Signed-off-by: Qi Zheng <qi.zheng@intel.com>
This commit is contained in:
@@ -35,3 +35,14 @@ function get_tags_in_docker {
|
||||
tags=$(curl $tag_url 2>/dev/null | docker run -i stedolan/jq '."results"[]["name"]')
|
||||
echo $tags
|
||||
}
|
||||
|
||||
function tag_and_push {
|
||||
local tag=$1
|
||||
local major_tag=$2
|
||||
|
||||
set -e
|
||||
docker tag $image:latest $image:$tag
|
||||
docker push $image:$tag
|
||||
docker tag $image:latest $image:$major_tag
|
||||
docker push $image:$major_tag
|
||||
}
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/golang"
|
||||
tag=$(get_tag go)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format x.y, such as 1.12, 1.13
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/haproxy"
|
||||
tag=$(get_tag haproxy)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format 1.6 or 2.0
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/httpd"
|
||||
tag=$(get_tag httpd)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/iperf"
|
||||
tag=$(get_tag iperf)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/mariadb"
|
||||
tag=$(get_tag mariadb)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/memcached"
|
||||
tag=$(get_tag memcached)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format like 1.4 or 1.5
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/nginx"
|
||||
tag=$(get_tag nginx-mainline)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format 1.16 or 1.17
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/node"
|
||||
tag=$(get_tag nodejs)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/openjdk"
|
||||
tag=$(get_tag openjdk13)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/openvino"
|
||||
tag=$(get_tag dldt)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/perl"
|
||||
tag=$(get_tag perl)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/php-fpm"
|
||||
tag=$(get_tag php)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/php"
|
||||
tag=$(get_tag php)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/postgres"
|
||||
tag=$(get_tag postgresql11)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/python"
|
||||
tag=$(get_tag python3)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format x.y, such as 3.6 , 3.7
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/rabbitmq"
|
||||
tag=$(get_tag rabbitmq-server)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
@@ -7,10 +7,6 @@ image="clearlinux/redis"
|
||||
tag=$(get_tag redis-native)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
set -e
|
||||
docker tag $image:latest $image:$tag
|
||||
docker push $image:$tag
|
||||
major_tag=${tag%%.*}
|
||||
docker tag $image:latest $image:$major_tag
|
||||
docker push $image:$major_tag
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/ruby"
|
||||
tag=$(get_tag ruby)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
major_tag=${tag%%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/tensorflow-serving"
|
||||
tag=$(get_tag tensorflow-serving)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format x.y, such as 1.14
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
echo "=> Tagging the image"
|
||||
|
||||
. ../docker-hooks.sh
|
||||
|
||||
image="clearlinux/tensorflow"
|
||||
tag=$(get_tag tensorflow)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$tag" ]; then
|
||||
# major tag format x.y, such as 1.16
|
||||
major_tag=${tag%.*}
|
||||
tag_and_push $tag $major_tag
|
||||
fi
|
||||
Reference in New Issue
Block a user