Created
August 18, 2022 16:18
-
-
Save Holzhaus/c92e9d5b9236a6870744757d58e475a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import yaml | |
SERVERS = [ | |
( | |
"asyncssh", | |
"images/asyncssh", | |
22000, | |
[ | |
"2.0.0", | |
"2.0.1", | |
"2.1.0", | |
"2.2.0", | |
"2.2.1", | |
"2.3.0", | |
"2.4.0", | |
"2.4.1", | |
"2.4.2", | |
"2.5.0", | |
"2.6.0", | |
"2.7.0", | |
"2.7.1", | |
"2.7.2", | |
"2.8.0", | |
"2.8.1", | |
"2.9.0", | |
"2.10.0", | |
"2.10.1", | |
"2.11.0", | |
"2.12.0", | |
], | |
), | |
( | |
"openssh", | |
"images/openssh-7.x", | |
22200, | |
[ | |
"7.0p1", | |
"7.1p1", | |
"7.2p2", | |
"7.3p1", | |
"7.4p1", | |
"7.5p1", | |
"7.6p1", | |
"7.7p1", | |
"7.8p1", | |
"7.9p1", | |
], | |
), | |
( | |
"openssh", | |
"images/openssh", | |
22210, | |
[ | |
"8.0p1", | |
"8.1p1", | |
"8.2p1", | |
"8.3p1", | |
"8.4p1", | |
"8.5p1", | |
"8.6p1", | |
"8.7p1", | |
"8.8p1", | |
"8.9p1", | |
"9.0p1", | |
], | |
), | |
( | |
"tinyssh", | |
"images/tinyssh", | |
22300, | |
[ | |
"20150801", | |
"20151001", | |
"20160201", | |
"20160301", | |
"20160318", | |
"20160720", | |
"20160726", | |
"20160727", | |
"20160809", | |
"20160811", | |
"20160812", | |
"20161001", | |
"20161101", | |
"20180101", | |
"20180110", | |
"20180201", | |
"20181206", | |
"20190101", | |
"20210319", | |
"20210601", | |
"20220101", | |
"20220222", | |
"20220305", | |
"20220311", | |
"20220801", | |
], | |
), | |
] | |
services = {} | |
for server_name, context, portrange_start, versions in SERVERS: | |
if server_name != "openssh": | |
continue | |
for i, version in enumerate(versions): | |
services[f"{server_name}-{version}"] = { | |
"image": f"rub-nds/{server_name}:{version}", | |
"build": { | |
"context": context, | |
"args": { | |
"VERSION": version, | |
}, | |
}, | |
"ports": [f"{portrange_start + i}:22"], | |
} | |
data = { | |
"version": "3.2", | |
"services": services, | |
} | |
print(yaml.dump(data, sort_keys=False)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment