Fix attempt for Container name checking
This commit is contained in:
parent
3bd10e1f94
commit
a27f7457aa
1 changed files with 2 additions and 2 deletions
|
@ -108,8 +108,8 @@ async function getStatus(entry: Service, containers: Dockerode.ContainerInfo[])
|
||||||
// Type Docker
|
// Type Docker
|
||||||
else if (entry.type === ServiceType.docker) {
|
else if (entry.type === ServiceType.docker) {
|
||||||
containers.forEach((container) => {
|
containers.forEach((container) => {
|
||||||
// Docker API returns container names with / prepended, not sure whether this always happens so both cases are checked
|
// Docker API returns container names with / prepended
|
||||||
if ((container.Names.includes( entry.docker_container_name)) || (container.Names.includes( "/" + entry.docker_container_name))) {
|
if (container.Names.includes( "/" + entry.docker_container_name)) {
|
||||||
// so far only "running" is properly implemented, mroe cases to follow as needed
|
// so far only "running" is properly implemented, mroe cases to follow as needed
|
||||||
switch (container.State) {
|
switch (container.State) {
|
||||||
case "running":
|
case "running":
|
||||||
|
|
Loading…
Reference in a new issue