Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b2bda6257 | |||
| 80a6ffeb18 |
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
usage() {
|
||||
echo -n "Usage: ${0} <RootDir>"
|
||||
echo
|
||||
@@ -49,7 +48,7 @@ build_docker_image() {
|
||||
image_version=$(get_latest_dist_version ${project})
|
||||
if [ -z "${image_version}" ]; then
|
||||
echo "No latest version found for ${project}"
|
||||
exit 1
|
||||
return
|
||||
fi
|
||||
echo "Latest version is ${image_version}"
|
||||
|
||||
@@ -141,10 +140,8 @@ image_exists() {
|
||||
print_all_reg_images() {
|
||||
project=${1}
|
||||
|
||||
# Fetch all repositories (images) from the registry
|
||||
repositories=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/_catalog" | jq -r '.repositories[]')
|
||||
|
||||
# Iterate over each repository to get its tags
|
||||
for repo in $repositories; do
|
||||
# Fetch all tags for the repository
|
||||
tags=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/$repo/tags/list" | jq -r '.tags[]')
|
||||
@@ -178,12 +175,18 @@ eval ${Cmd}
|
||||
|
||||
convert_symlink_to_dir docker_dev
|
||||
|
||||
echo "${DIMAGES_CONFIG}" | jq -c 'to_entries[]' | while IFS= read -r item; do
|
||||
Jobs=()
|
||||
while IFS= read -r item; do
|
||||
Jobs+=("$item")
|
||||
done < <(echo "${DIMAGES_CONFIG}" | jq -c 'to_entries[]')
|
||||
|
||||
for item in "${Jobs[@]}"; do
|
||||
# Extract key (name) and values
|
||||
title=$(echo "$item" | jq -r '.key')
|
||||
image_name=$(echo "$item" | jq -r '.value.image_name')
|
||||
docker_dev_path=$(echo "$item" | jq -r '.value.docker_dev_path')
|
||||
project=$(echo "$item" | jq -r '.value.based_on_project')
|
||||
|
||||
build_docker_image "$title" "$image_name" "$docker_dev_path" "$project"
|
||||
done
|
||||
|
||||
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo -n "Usage: ${0} <grep_filter>"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
# --- Settings
|
||||
RegistryService=cloud21.cvtt.vpn:5500
|
||||
RegistryProtocol=http
|
||||
|
||||
print_all_reg_images() {
|
||||
project=${1}
|
||||
|
||||
repositories=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/_catalog" | jq -r '.repositories[]')
|
||||
|
||||
for repo in $repositories; do
|
||||
# Fetch all tags for the repository
|
||||
tags=$(curl -s "${RegistryProtocol}://${RegistryService}/v2/$repo/tags/list" | jq -r '.tags[]')
|
||||
|
||||
# List each tag
|
||||
echo "REPO: $repo"
|
||||
for tag in $tags; do
|
||||
if [ "${project}" == "" ];then
|
||||
echo "$repo:$tag"
|
||||
else
|
||||
echo "$repo:$tag" | grep ${project}
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
print_all_reg_images ${1}
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
Cmd="docker run"
|
||||
Cmd+=" -d"
|
||||
Cmd+=" --rm"
|
||||
Cmd+=" --pull=always"
|
||||
Cmd+=" --network=host"
|
||||
Cmd+=" --name=crypto_exch_stats"
|
||||
Cmd+=" --volume=${HOME}/prod/data:/app/data"
|
||||
Cmd+=" --volume=${HOME}/prod/logs:/logs"
|
||||
Cmd+=" cloud21.cvtt.vpn:5500/crypto_exch_stats:latest"
|
||||
|
||||
echo ${Cmd}
|
||||
eval ${Cmd}
|
||||
# Cmd+=" cloud21.cvtt.vpn:5500/relative_liquidity:latest"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.8.5,docker_image_builder
|
||||
1.8.6,crypto_exch_stats docker run
|
||||
|
||||
Reference in New Issue
Block a user