nová verze
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
FROM litespeedtech/openlitespeed:1.8.5-lsphp85
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
lsphp81 lsphp81-mysql lsphp81-opcache lsphp81-redis lsphp81-curl lsphp81-intl \
|
||||
lsphp82 lsphp82-mysql lsphp82-opcache lsphp82-redis lsphp82-curl lsphp82-intl \
|
||||
lsphp83 lsphp83-mysql lsphp83-opcache lsphp83-redis lsphp83-curl lsphp83-intl \
|
||||
lsphp84 lsphp84-mysql lsphp84-opcache lsphp84-redis lsphp84-curl lsphp84-intl \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/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
|
||||
# =========================================================#
|
||||
Reference in New Issue
Block a user