Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fauna local no daemon text #528

Open
wants to merge 2 commits into
base: v3
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions src/lib/docker-containers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,28 @@ export async function ensureContainerRunning({
color: _color,
}) {
color = _color;
if (pull) {
await pullImage(IMAGE_NAME);
let logStream;
try {
if (pull) {
await pullImage(IMAGE_NAME);
}
logStream = await startContainer({
imageName: IMAGE_NAME,
containerName,
hostIp,
hostPort,
containerPort,
});
} catch (error) {
if (error.message.includes("connect ENOENT /var/run/docker.sock")) {
throw new CommandError(
"Could not connect to docker daemon. Please ensure that it is currently running.",
);
} else {
throw error;
}
}
const logStream = await startContainer({
imageName: IMAGE_NAME,
containerName,
hostIp,
hostPort,
containerPort,
});

stderr(
`[StartContainer] Container '${containerName}' started. Monitoring HealthCheck for readiness.`,
);
Expand Down