![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Docker primitives for the backends that legitimately ship an image. More...
#include <cstddef>#include <cstdlib>#include <string>#include <vector>#include <sys/stat.h>#include <sys/statvfs.h>#include "line/util/subprocess.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::io |
Functions | |
| bool | line::io::docker_daemon_available () |
| True if the Docker daemon is reachable. | |
| bool | line::io::docker_has_local_image (const std::string &image) |
| bool | line::io::docker_pull (const std::string &image) |
| Pulls an image, streaming Docker's progress to stdout and stderr. | |
| bool | line::io::docker_has_storage_for (const std::string &image) |
Variables | |
| static const long long | line::io::DOCKER_DEFAULT_MIN_FREE_BYTES = 2LL * 1024 * 1024 * 1024 |
| Conservative free-space floor required before a pull (2 GiB). | |
Docker primitives for the backends that legitimately ship an image.
Port of jar/src/main/java/jline/io/DockerImage.java. In the JAR these are shared by the JMT backend (imperialqore/jmt-rest) and the Sage symbolic engine (imperialqore/line-sage-rest); this port has only the second so far. Each backend owns its image name; this file only answers whether the daemon is up, whether an image is present, whether there is room to pull it, and performs the pull.
LQNS, lqsim and qnsolver are deliberately absent, here as in the JAR: their licence is an evaluation agreement that forbids redistribution, so LINE runs them only from a binary the user installed.
THE STORAGE GUARD IS NOT DECORATION. A pull that fills the filesystem backing the Docker root breaks every container on the machine, not just LINE's, so a pull is refused unless the free space clears the larger of 2 GiB and three times the compressed manifest size. When the free space cannot be determined the pull is ALLOWED: an unknown is not evidence of a full disk, and refusing would strand users whose daemon does not report a root dir.
Definition in file docker_image.h.