Skip to content
Latchkey

CircleCI machine Executor Errors - Image & Setup Fixes

A job that needs a full VM (the machine executor) is misconfigured - an invalid image tag, a missing image field, or it tries to run Docker commands on a docker executor that has no daemon.

What this error means

The job fails to provision the machine, reports an unknown machine image, or a docker build step errors with "Cannot connect to the Docker daemon" because it ran on a Docker executor rather than a machine.

job log
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
# or
machine image "ubuntu-2099:edge" is not a valid image

Common causes

Invalid or missing machine image

The machine.image must be a published image tag (e.g. ubuntu-2204:current). A typo or retired tag fails to provision.

Docker commands on a docker executor

The docker executor runs your job inside a container with no Docker daemon. docker build/docker run there fails unless you switch to a machine executor or use setup_remote_docker.

Missing setup_remote_docker

To build images from within a docker executor you must add the setup_remote_docker step; without it there is no daemon to talk to.

How to fix it

Use a valid machine image for Docker-heavy jobs

.circleci/config.yml
jobs:
  build-image:
    machine:
      image: ubuntu-2204:current
    steps:
      - checkout
      - run: docker build -t app .

Or add setup_remote_docker on a docker executor

.circleci/config.yml
jobs:
  build-image:
    docker:
      - image: cimg/base:current
    steps:
      - checkout
      - setup_remote_docker:
          version: default
      - run: docker build -t app .

How to prevent it

  • Pin a documented, current machine.image tag.
  • Use machine (or setup_remote_docker) whenever a job runs Docker.
  • Validate config so a bad machine image fails before scheduling.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →