From f6a3b9c11ff62a0e4d2f1ee3fba223652d2a7af5 Mon Sep 17 00:00:00 2001 From: ChowRex Date: Tue, 9 Jul 2024 16:00:16 +0800 Subject: [PATCH] Update README.md - Add a short usage for docker --- README.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 323d952..24a910c 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,39 @@ If still not satisfied, you may try the final wepon: FORCED INSTALL. rpm -ivh --force --nodeps --replacepkgs --replacefiles openssh-*.rpm ``` - ## Use Docker -See file `docker.README.md` +### TL;DR + +```bash +# Define output directory +OUTPUT="/tmp/openssh-rpms" +# Specify build os and versions +declare -A MAPPING +MAPPING["amazonlinux2023"]="amzn2023" +MAPPING["amazonlinux2"]="amzn2" +MAPPING["amazonlinux1"]="amzn1" +MAPPING["centos-stream9"]="el7" +MAPPING["centos-stream8"]="el7" +MAPPING["centos7"]="el7" +MAPPING["centos6"]="el6" +# CentOS 5 is NOT valid. +# MAPPING["centos5"]="el5" + +for VERSION in "${!MAPPING[@]}"; +do + DIST=${MAPPING[$VERSION]} + echo "Create for OS: ${VERSION}" + mkdir -p $OUTPUT/$VERSION + # Run the builder container + docker run -it --rm \ + -v $OUTPUT/$VERSION:/data/$DIST/RPMS \ + chowrex/openssh-rpms:$VERSION +done + +``` + +For more details, see file `docker.README.md` ## Security Notes