I am currently working on adding a button that will initiate all the inactive containers. I am using Dockerode to accomplish this task, as I have successfully implemented a similar function to stop all containers.
However, while trying to start the containers using the same method, it seems like
docker.listContainers(function(err, containers) {}
only shows the running containers.
Does anyone know how I can retrieve information for all the containers?
Here is my code snippet, although it may not be directly related to the question:
docker.listContainers(function(err, containers) {
if (err) {
} else {
containers.forEach(function(containerInfo) {
console.log(docker.getContainer(containerInfo.Id));
docker.getContainer(containerInfo.Id).start(function(err, data) {
if (err) {
} else {
console.log(data);
}
});
});
}
});