Unable to get machine image running locally with CLI

I have reduced this to a minimum set

version: 2.1

executors:
  main:
    machine:
      image: ubuntu-2004:202104-01
      docker_layer_caching: true

jobs:
  test:
    executor: main
    steps:
      - run:
          name: 'test'
          command: |
            echo hello
workflows:
  version: 2
  test:
    jobs:
      - test

This configuration (which uses the same executor we’re using in production) cannot be run locally with the circleci tool. The output is as follows

▶ circleci local execute --job test
Fetching latest build environment...
Docker image digest: sha256:db03a92f0796aef83e3533ba22bb8a4fcd6cacdd90ec4dcb3a524e4ea381d231
====>> Spin up environment
Build-agent version  ()
System information:
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Kernel Version: 5.10.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64

Starting container ubuntu-2004:202104-01
Warning: No authentication provided, using CircleCI credentials for pulls from Docker Hub.
  image cache not found on this host, downloading ubuntu-2004:202104-01

  Error pulling image ubuntu-2004:202104-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202104-01

  Error pulling image ubuntu-2004:202104-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202104-01

  Error pulling image ubuntu-2004:202104-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202104-01

  Error pulling image ubuntu-2004:202104-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202104-01

  Error pulling image ubuntu-2004:202104-01: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied... retrying
  image cache not found on this host, downloading ubuntu-2004:202104-01
Error: 
Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Step failed
Task failed
Error: Error response from daemon: pull access denied for ubuntu-2004, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I did the obvious “docker login” but it appears that some other form of authentication is needed.

We’re trying to run our build locally to diagnose some mysterious exit code 243 problem in our build so this is a major blocker.

1 Like

Hi @metalsheep ,

As per our documentation, this is a known limitation of the CircleCI CLI.

We have an open feature request about this topic. Please consider adding your vote to it.