Fix environment vars and labels containing multiple equals

This commit is contained in:
Johnwesley R 2023-07-23 11:03:56 -04:00
parent 1f8fbfb0a2
commit 6417e850e4
2 changed files with 2 additions and 2 deletions

View file

@ -225,7 +225,7 @@ const DockerComposeImport = ({ refresh, dockerComposeInit, installerInit, defaul
if (Array.isArray(doc.services[key].labels)) {
let labels = {};
doc.services[key].labels.forEach((label) => {
const [key, value] = label.split('=');
const [key, value] = label.split(/=(.*)/s);
labels['' + key] = '' + value;
});
doc.services[key].labels = labels;

View file

@ -56,7 +56,7 @@ const DockerContainerSetup = ({noCard, containerInfo, installer, OnChange, refre
image: containerInfo.Config.Image,
restartPolicy: containerInfo.HostConfig.RestartPolicy.Name,
envVars: containerInfo.Config.Env.map((envVar) => {
const [key, value] = envVar.split('=');
const [key, value] = envVar.split(/=(.*)/s);
return { key, value };
}),
labels: Object.keys(containerInfo.Config.Labels).map((key) => {