Global.env editor and usage in docker operations (#387)

Co-authored-by: Paco Culebras <69261057+pacoculebras@users.noreply.github.com>
Co-authored-by: Paco Culebras <pculebras@me.com>
Co-authored-by: Cyril59310 <70776486+cyril59310@users.noreply.github.com>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
Co-authored-by: cmcooper1980 <31871143+cmcooper1980@users.noreply.github.com>
This commit is contained in:
Kevin
2025-12-23 04:41:04 -05:00
committed by GitHub
parent 98cd537ba8
commit 420c3af66d
10 changed files with 181 additions and 18 deletions

View File

@@ -299,6 +299,7 @@ function copyYAMLCommentsItems(items: any, srcItems: any) {
* - "8000-9000:80"
* - "127.0.0.1:8001:8001"
* - "127.0.0.1:5000-5010:5000-5010"
* - "0.0.0.0:8080->8080/tcp"
* - "6060:6060/udp"
* @param input
* @param hostname
@@ -308,9 +309,19 @@ export function parseDockerPort(input : string, hostname : string) {
let display;
const parts = input.split("/");
const part1 = parts[0];
let part1 = parts[0];
let protocol = parts[1] || "tcp";
// coming from docker ps, split host part
const arrow = part1.indexOf("->");
if (arrow >= 0) {
part1 = part1.split("->")[0];
const colon = part1.indexOf(":");
if (colon >= 0) {
part1 = part1.split(":")[1];
}
}
// Split the last ":"
const lastColon = part1.lastIndexOf(":");