Skip to content
This repository was archived by the owner on Jan 11, 2025. It is now read-only.

Commit 2aa2486

Browse files
fixed latest supported version + fix rawhide missing key on fedora:33
1 parent 6a91f71 commit 2aa2486

File tree

10 files changed

+975
-603
lines changed

10 files changed

+975
-603
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ auto-update: generate-supported-versions generate-dockerfiles update-tags
1111

1212
auto-update-and-commit: auto-update
1313
set -eux
14+
export TAG_VER="v1.$(date +%Y%m%d)"
1415
git config --global user.name "fabiocicerchia"
1516
git config --global user.email "[email protected]"
1617
git add -A
@@ -19,6 +20,8 @@ auto-update-and-commit: auto-update
1920
git remote set-url --push origin "https://fabiocicerchia:${GH_TOKEN}@github.com/fabiocicerchia/nginx-lua.git"
2021
set -x
2122
git push origin HEAD:master
23+
git tag $(TAG_VER) -a -m "Auto tag $(TAG_VER)"
24+
git push origin --tags
2225

2326
generate-supported-versions:
2427
./bin/generate-supported-versions.sh

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Nginx 1.19+ with Lua support based on Alpine Linux, Amazon Linux, CentOS, Debian
2222
<!-- START_SUPPORTED_TAGS -->
2323
- [`1`,`1.19`,`1.19.3`,`alpine`,`1-alpine`,`1.19-alpine`,`1.19.3-alpine`,`1-alpine3.12.1`,`1-alpine3.12.1`,`1.19-alpine3.12.1`,`1.19.3-alpine3.12.1`,`latest`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/alpine/3.12.1/Dockerfile)
2424
- [`amazonlinux`,`1-amazonlinux`,`1.19-amazonlinux`,`1.19.3-amazonlinux`,`1-amazonlinux2.0.20200722.0`,`1-amazonlinux2.0.20200722.0`,`1.19-amazonlinux2.0.20200722.0`,`1.19.3-amazonlinux2.0.20200722.0`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/amazonlinux/2.0.20200722.0/Dockerfile)
25-
- [`centos`,`1-centos`,`1.19-centos`,`1.19.3-centos`,`1-centos8.2.2004`,`1-centos8.2.2004`,`1.19-centos8.2.2004`,`1.19.3-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/centos/8.2.2004/Dockerfile)
26-
- [`debian`,`1-debian`,`1.19-debian`,`1.19.3-debian`,`1-debian10.6-slim`,`1-debian10.6-slim`,`1.19-debian10.6-slim`,`1.19.3-debian10.6-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/debian/10.6-slim/Dockerfile)
27-
- [`fedora`,`1-fedora`,`1-fedora34`,`1-fedora34`,`1.19-fedora`,`1.19-fedora34`,`1.19.3-fedora`,`1.19.3-fedora34`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/fedora/34/Dockerfile)
28-
- [`ubuntu`,`1-ubuntu`,`1.19-ubuntu`,`1-ubuntu20.10`,`1-ubuntu20.10`,`1.19.3-ubuntu`,`1.19-ubuntu20.10`,`1.19.3-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/ubuntu/20.10/Dockerfile)
25+
- [`centos`,`1-centos`,`1.19-centos`,`1.19.3-centos`,`1-centoscentos8`,`1-centoscentos8`,`1.19-centoscentos8`,`1.19.3-centoscentos8`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/centos/centos8/Dockerfile)
26+
- [`debian`,`1-debian`,`1.19-debian`,`1-debian10.6`,`1-debian10.6`,`1.19.3-debian`,`1.19-debian10.6`,`1.19.3-debian10.6`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/debian/10.6/Dockerfile)
27+
- [`fedora`,`1-fedora`,`1-fedora33`,`1-fedora33`,`1.19-fedora`,`1.19-fedora33`,`1.19.3-fedora`,`1.19.3-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/fedora/33/Dockerfile)
28+
- [`ubuntu`,`1-ubuntu`,`1.19-ubuntu`,`1-ubuntu20.04`,`1-ubuntu20.04`,`1.19.3-ubuntu`,`1.19-ubuntu20.04`,`1.19.3-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/master/nginx/1.19.3/ubuntu/20.04/Dockerfile)
2929
<!-- END_SUPPORTED_TAGS -->
3030

3131
**Note:** The full list of supported/unsupported tags can be found on [docs/TAGS.md](https://github.com/fabiocicerchia/nginx-lua/blob/master/docs/TAGS.md).

bin/generate-supported-versions.sh

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
#!/bin/bash
22
# shellcheck disable=SC2207,SC2129
33

4+
fetch_latest() {
5+
DISTRO=$1
6+
FILTER=${2-}
7+
if [ "$FILTER" == "" ]; then
8+
FILTER=".+"
9+
fi
10+
DIGEST=$(curl "https://hub.docker.com/v2/repositories/library/$DISTRO/tags/latest" | jq -rc '.images[] | select( .architecture == "amd64") | .digest')
11+
VER=$(curl "https://hub.docker.com/v2/repositories/library/$DISTRO/tags" | jq -rc '.results[] | select( .images[].digest == "'$DIGEST'" and .name != "latest" ) | .name' | grep -E "$FILTER" | sort -Vr | head -n 1)
12+
13+
PAGE=2
14+
while [ "$VER" = "" -a $PAGE -lt 100 ]; do
15+
VER=$(curl "https://hub.docker.com/v2/repositories/library/$DISTRO/tags?page=$PAGE" | jq -rc '.results[] | select( .images[].digest == "'$DIGEST'" and .name != "latest" ) | .name' | grep -E "$FILTER" | sort -Vr | head -n 1)
16+
((PAGE+=1))
17+
done
18+
19+
echo $VER
20+
}
21+
422
set -eux
523

6-
VER_NGINX=$(DISTRO=nginx; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep -E "[0-9]+\.[0-9]+\.[0-9]+" | grep -E -v "alpine|perl" | sort -Vr | head -n 1)
24+
VER_NGINX=$(DISTRO=nginx; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/ß[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep -E "[0-9]+\.[0-9]+\.[0-9]+" | grep -E -v "alpine|perl" | sort -Vr | head -n 1)
725
NGINX=()
826
for VER in $VER_NGINX; do
927
NGINX+=("$VER")
@@ -13,62 +31,44 @@ if [ "${#NGINX[@]}" != "1" ]; then
1331
exit 1
1432
fi
1533

16-
VER_ALPINE=$(DISTRO=alpine; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep -E "[0-9]+\.[0-9]+\.[0-9]+" | sort -Vr | head -n 1)
17-
ALPINE=()
18-
for VER in $VER_ALPINE; do
19-
ALPINE+=("$VER")
20-
done
21-
if [ "${#ALPINE[@]}" != "1" ]; then
34+
VER_ALPINE=$(fetch_latest "alpine")
35+
ALPINE=("$VER_ALPINE")
36+
if [ "$VER_ALPINE" = "" ]; then
2237
echo "Wrong version count in ALPINE."
2338
exit 1
2439
fi
2540

26-
VER_AMAZONLINUX=$(DISTRO=amazonlinux; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep -E -v "with-|^201" | grep -E "[0-9]+\." | sort -Vr | head -n 1)
27-
AMAZONLINUX=()
28-
for VER in $VER_AMAZONLINUX; do
29-
AMAZONLINUX+=("$VER")
30-
done
31-
if [ "${#AMAZONLINUX[@]}" != "1" ]; then
41+
VER_AMAZONLINUX=$(fetch_latest "amazonlinux")
42+
AMAZONLINUX=("$VER_AMAZONLINUX")
43+
if [ "$VER_AMAZONLINUX" = "" ]; then
3244
echo "Wrong version count in AMAZONLINUX."
3345
exit 1
3446
fi
3547

36-
VER_CENTOS=$(DISTRO=centos; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep "\." | grep -E -v centos | sort -Vr | head -n 1)
37-
CENTOS=()
38-
for VER in $VER_CENTOS; do
39-
CENTOS+=("$VER")
40-
done
41-
if [ "${#CENTOS[@]}" != "1" ]; then
48+
VER_CENTOS=$(fetch_latest "centos" "^\d$")
49+
CENTOS=("$VER_CENTOS")
50+
if [ "$VER_CENTOS" = "" ]; then
4251
echo "Wrong version count in CENTOS."
4352
exit 1
4453
fi
4554

46-
VER_DEBIAN=$(DISTRO=debian; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep "\." | grep -E slim | sort -Vr | head -n 1)
47-
DEBIAN=()
48-
for VER in $VER_DEBIAN; do
49-
DEBIAN+=("$VER")
50-
done
51-
if [ "${#DEBIAN[@]}" != "1" ]; then
55+
VER_DEBIAN=$(fetch_latest "debian" "^\d{2}\.\d{1,2}")
56+
DEBIAN=("$VER_DEBIAN")
57+
if [ "$VER_DEBIAN" = "" ]; then
5258
echo "Wrong version count in DEBIAN."
5359
exit 1
5460
fi
5561

56-
VER_FEDORA=$(DISTRO=fedora; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | sort -nr | head -n 1)
57-
FEDORA=()
58-
for VER in $VER_FEDORA; do
59-
FEDORA+=("$VER")
60-
done
61-
if [ "${#FEDORA[@]}" != "1" ]; then
62+
VER_FEDORA=$(fetch_latest "fedora")
63+
FEDORA=("$VER_FEDORA")
64+
if [ "$VER_FEDORA" = "" ]; then
6265
echo "Wrong version count in FEDORA."
6366
exit 1
6467
fi
6568

66-
VER_UBUNTU=$(DISTRO=ubuntu; wget -q https://registry.hub.docker.com/v1/repositories/$DISTRO/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | cut -d: -f3 | grep "\." | sort -nr | head -n 1)
67-
UBUNTU=()
68-
for VER in $VER_UBUNTU; do
69-
UBUNTU+=("$VER")
70-
done
71-
if [ "${#UBUNTU[@]}" != "1" ]; then
69+
VER_UBUNTU=$(fetch_latest "ubuntu" "^\d{2}\.\d{2}")
70+
UBUNTU=("$VER_UBUNTU")
71+
if [ "$VER_UBUNTU" = "" ]; then
7272
echo "Wrong version count in UBUNTU."
7373
exit 1
7474
fi

docs/TAGS.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44

55
- [`1-alpine`, `1`, `1.19-alpine`, `1.19`, `1.19.3-alpine`, `1.19-3`, `1.19.3-alpine3.12.1`, `1.19-alpine3.12.1`, `1-alpine3.12.1`, `alpine`, `latest`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/alpine/3.12.1/Dockerfile)
66
- [`1-amazonlinux`, `1.19-amazonlinux`, `1.19-amazonlinux2.0.20200722.0`, `1-amazonlinux2.0.20200722.0`, `1.19.3-amazonlinux`, `1.19.3-amazonlinux2.0.20200722.0`, `amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/amazonlinux/2.0.20200722.0/Dockerfile)
7-
- [`1-centos`, `1-centos8.2.2004`, `1.19-centos`, `1.19-centos8.2.2004`, `1.19.3-centos`, `1.19.3-centos8.2.2004`, `centos`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/centos/8.2.2004/Dockerfile)
8-
- [`1-debian`, `1.19-debian`, `1.19.3-debian`, `1.19.3-debian10.6-slim`, `1.19-debian10.6-slim`, `1-debian10.6-slim`, `debian`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/debian/10.6-slim/Dockerfile)
9-
- [`1-fedora`, `1.19-fedora`, `1.19-fedora34`, `1-fedora34`, `1.19.3-fedora`, `1.19.3-fedora34`, `fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/fedora/34/Dockerfile)
10-
- [`1-ubuntu`, `1-ubuntu20.10`, `1.19-ubuntu`, `1.19-ubuntu20.10`, `1.19.3-ubuntu`, `1.19.3-ubuntu20.10`, `ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/ubuntu/20.10/Dockerfile)
7+
- [`1-centos`, `1.19-centos`, `1.19.3-centos`, `1.19.3-centos8`, `1.19-centos8`, `1-centos8`, `centos`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/centos/8/Dockerfile)
8+
- [`1-debian`, `1.19-debian`, `1.19.3-debian`, `1.19.3-debian10.6`, `1.19-debian10.6`, `1-debian10.6`, `debian`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/debian/10.6/Dockerfile)
9+
- [`1-fedora33`, `1.19-fedora33`, `1.19.3-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/fedora/33/Dockerfile)
10+
- [`1-ubuntu20.04`, `1.19-ubuntu20.04`, `1.19.3-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/ubuntu/20.04/Dockerfile)
1111

1212
## Unsupported Tags
1313

14-
- [`1-ubuntu20.04`, `1.19-ubuntu20.04`, `1.19.3-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/ubuntu/20.04/Dockerfile)
15-
- [`1-fedora33`, `1.19-fedora33`, `1.19.3-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/fedora/33/Dockerfile)
14+
- [`1-ubuntu`, `1-ubuntu20.10`, `1.19-ubuntu`, `1.19-ubuntu20.10`, `1.19.3-ubuntu`, `1.19.3-ubuntu20.10`, `ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/ubuntu/20.10/Dockerfile)
15+
- [`1-fedora`, `1.19-fedora`, `1.19-fedora34`, `1-fedora34`, `1.19.3-fedora`, `1.19.3-fedora34`, `fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/fedora/34/Dockerfile)
16+
- [`1.19.3-debian10.6-slim`, `1.19-debian10.6-slim`, `1-debian10.6-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/debian/10.6-slim/Dockerfile)
1617
- [`1.19-debian10.5-slim`, `1-debian10.5-slim`, `1.19.3-debian10.5-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/debian/10.5-slim/Dockerfile)
1718
- [`1-debian10.4-slim`, `1.19-debian10.4-slim`, `1.19.3-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/debian/10.4-slim/Dockerfile)
19+
- [`1-centos8.2.2004`, `1.19-centos8.2.2004`, `1.19.3-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/centos/8.2.2004/Dockerfile)
1820
- [`1-centos8.1.1911`, `1.19-centos8.1.1911`, `1.19.3-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/centos/8.1.1911/Dockerfile)
1921
- [`1.19-amazonlinux2.0.20200602.0`, `1-amazonlinux2.0.20200602.0`, `1.19.3-amazonlinux2.0.20200602.0`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/amazonlinux/2.0.20200602.0/Dockerfile)
2022
- [`1-alpine3.12.0`, `1.19-alpine3.12.0`, `1.19.3-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/masternginx/1.19.3/alpine/3.12.0/Dockerfile)

0 commit comments

Comments
 (0)