This commit is contained in:
2026-08-18 09:39:33 +02:00
parent 69b0216521
commit 0e8edcd5c0
119 changed files with 0 additions and 20366 deletions
-59
View File
@@ -1,59 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
registry="registry.wedos.org/mk250/sodew-bash"
imageName="openlitespeed"
imageBaseTag="1.8.5-lsphp85-multiphp"
imageFullTag="${imageBaseTag}-$(date +%y.%m.%d)"
imageFull="$registry/${imageName}:${imageFullTag}"
imageLatest="$registry/${imageName}:${imageBaseTag}-latest"
echo "Image build: ${imageFull}"
docker build -t "${imageFull}" -t "${imageLatest}" "$(dirname "$0")"
echo "Image push: ${imageFull}"
docker push "${imageFull}"
echo "Image push: ${imageLatest}"
docker push "${imageLatest}"
echo "Compete"
# Export and deploy to k3s node
nodeHost="139.sodew.ai"
tarFile="/tmp/${imageName}-${imageFullTag}.tar.gz"
echo "Export image: ${tarFile}"
docker save "${imageFull}" | gzip > "${tarFile}"
echo "Copy to node: ${nodeHost}"
scp "${tarFile}" "root@${nodeHost}:/tmp/"
echo "Import to k3s containerd"
ssh "root@${nodeHost}" "k3s ctr images import /tmp/$(basename ${tarFile}) && rm /tmp/$(basename ${tarFile})"
rm "${tarFile}"
echo "Complete"
# Download
# docker save registry.wedos.org/mk250/sodew-bash/openlitespeed:1.8.5-lsphp85-multiphp-26.08.06 | gzip > ./images/ols-1.8.5-lsphp85-multiphp-26.08.06.tar.gz
docker save "$imageFull" | gzip > "./images/$imageFullTag.tar.gz"
#
# =========================================================
### If there is no Docker registry
# =========================================================
## 1. pull and save image
# docker pull registry.wedos.org:443/mk250/sodew-bash/openlitespeed:1.8.5-lsphp85-multiphp-26.08.06
# docker save registry.wedos.org/mk250/sodew-bash/openlitespeed:1.8.5-lsphp85-multiphp-26.08.06 | gzip > ols-1.8.5-lsphp85-multiphp-26.08.06.tar.gz
## 2. copy to work server
# scp ols-image.tar.gz root@139.sodew.ai:/tmp/
## 3. import to containerd (k3s use containerd)
# k3s ctr images import /tmp/ols-image.tar.gz
# =========================================================#