builder
builder copied to clipboard
Builder fails with 'FATAL: Can't pull image'
I've been using the homeassistant/amd64-builder to build a custom local HASS image, and the command I was using began to fail around a week ago. Previously the build would succeed but now it will throw a fatal error trying to pull the ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2 image.
$ docker run --rm --privileged --shm-size=1024m -v /var/run/docker.sock:/var/run/docker.sock:ro -v /home/user/projects/home-assistant:/data homeassistant/amd64-builder --amd64 -t /data --test --generic local
Unable to find image 'homeassistant/amd64-builder:latest' locally
latest: Pulling from homeassistant/amd64-builder
ef5531b6e74e: Pull complete
33b65704084a: Pull complete
06b79ad9572c: Pull complete
f68b5e207a61: Pull complete
3f0f7beaf986: Pull complete
8450e4bcb7bb: Pull complete
Digest: sha256:fbdb77f059e734b48e81994dc48add05e08bc0d4d66762d7c7d64f1278a6b970
Status: Downloaded newer image for homeassistant/amd64-builder:latest
[01:03:51] INFO: Setup crosscompiling feature
[01:04:13] INFO: Using host docker setup with '/var/run/docker.sock'
[01:04:13] INFO: Run generic build for: amd64
[01:04:13] INFO: Init cache for homeassistant/amd64-homeassistant:local with tag latest and platform linux/amd64
CAS saved locally the trusted public key
CAS automatically trusted the signature found on current connection
UID: 1684723576173907782
Kind: docker
Name: docker://homeassistant/amd64-homeassistant:2023.6.0.dev20230522
Hash: 5daff6b16892dadacc7f6fa04748565df93bb38e7bfb1413b73f58965e3c0d02
Size: 1.8 GB
Timestamp: 2023-05-22 02:46:16.173907782 +0000 UTC
Metadata: GITHUB_SERVER_URL="https://github.com"
GITHUB_SHA="69770bac2261c1a9373a7818ab9187df2555f785"
GITHUB_GRAPHQL_URL="https://api.github.com/graphql"
GITHUB_EVENT_NAME="schedule"
GITHUB_WORKFLOW="Build images"
platform="linux"
version="2023.6.0.dev20230522"
CAS_CI_ENV="github"
GITHUB_JOB="build_base"
GITHUB_REF="refs/heads/dev"
GITHUB_RUN_NUMBER="1162"
docker={
"Architecture": "amd64",
"Author": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2023-05-22T02:45:51.831633722Z",
"DockerVersion": "",
"Id": "sha256:5daff6b16892dadacc7f6fa04748565df93bb38e7bfb1413b73f58965e3c0d02",
"Metadata": {
"LastTagTime": "2023-05-22T02:46:14.524286657Z"
},
"Os": "linux",
"RepoDigests": [],
"RepoTags": [
"homeassistant/amd64-homeassistant:2023.6.0.dev20230522",
"homeassistant/amd64-homeassistant:latest",
"ghcr.io/home-assistant/amd64-homeassistant:2023.6.0.dev20230522",
"ghcr.io/home-assistant/amd64-homeassistant:latest"
],
"Size": 1815411594,
"VirtualSize": 1815411594
}
GITHUB_API_URL="https://api.github.com"
GITHUB_ACTION="__home-assistant_builder"
GITHUB_ACTIONS="true"
GITHUB_ACTOR="balloob"
GITHUB_REPOSITORY="home-assistant/core"
GITHUB_RUN_ID="5041097185"
CI="true"
architecture="amd64"
GITHUB_WORKSPACE="/home/runner/work/core/core"
SignerID: bm90YXJ5QGhvbWUtYXNzaXN0YW50Lmlv
Apikey revoked: no
Status: TRUSTED
[01:06:05] INFO: Image homeassistant/amd64-homeassistant:latest is trusted
[01:06:05] INFO: Download image ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2 for CodeNotary validation
[01:06:07] FATAL: Can't pull image ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2
Pulling the image on the host works fine
$ docker pull ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2
2023.04.2: Pulling from home-assistant/amd64-homeassistant-base
Digest: sha256:9ea7d5f25cfb334e1d51d73e60450943ba85df03b3614ab87ca9a46717566b0e
Status: Image is up to date for ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2
ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2
But when the --platform amd64 parameter is used like in the script it throws
$ docker pull ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2 --platform amd64
2023.04.2: Pulling from home-assistant/amd64-homeassistant-base
Digest: sha256:9ea7d5f25cfb334e1d51d73e60450943ba85df03b3614ab87ca9a46717566b0e
Status: Image is up to date for ghcr.io/home-assistant/amd64-homeassistant-base:2023.04.2
No such image: ghcr.io/home-assistant/amd64-homeassistant-base:latest
Perhaps the latest image wasn't tagged correctly, or I'm using the script incorrectly. Happy to provide anything else, I managed to get the image building by removing that image pull (which I believe is used for the CodeNotary) from the builder.sh temporarily.