Fixed docker container name checking
This commit is contained in:
parent
3303008ec3
commit
c1d6f5d62e
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ async function getStatus(entry: Service, containers: Dockerode.ContainerInfo[])
|
||||||
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, not sure whether this always happens so both cases are checked
|
||||||
if (container.Names.includes( entry.docker_container_name || "/" + entry.docker_container_name)) {
|
if ((container.Names.includes( entry.docker_container_name)) || (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