Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
- Add a short usage for docker
  • Loading branch information
ChowRex committed Jul 10, 2024
1 parent 52ab6e3 commit f6a3b9c
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f6a3b9c

Please sign in to comment.