docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.56k stars 481 forks source link

COPY instruction is not cached on linux/arm64 when cache is generated on linux/amd64 machine #1921

Open audgster opened 1 year ago

audgster commented 1 year ago

Contributing guidelines

I've found a bug and checked that ...

Description

COPY directives don't use inline caching when using an image cache built on a different architecture. If a cache is produced by docker engine on a linux/amd64 machine and used as the cache source by docker engine running on a linux/arm64 machine, COPY directives are not recognized as being cached and subsequent layers are re-built, even if both builds are targeting the same platform.

Expected behaviour

  1. On Apple Sillicon run: docker build --cache-to=type=inline -t <your docker repo here>/build-cache-image:arm64 --platform=linux/x86_64 . docker push

  2. On Intel silicon run: docker build --cache-to=type=inline -t <your docker repo here>/build-cache-image:x86 --platform=linux/x86_64 . docker push

On both machines, clear the build cache with docker builder prune Verify all caches are cleared with docker system df

  1. On Apple Silicon run: docker build --cache-from=<your docker repo here>/build-cache-image:arm64 -t final-image --platform=linux/x86_64 . Since nothing has changed in your files, all layers should be cached:
    [+] Building 1.5s (15/15) FINISHED                                                                                                                                                                                                           
    => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s
    => => transferring dockerfile: 340B                                                                                                                                                                                                    0.0s
    => [internal] load .dockerignore                                                                                                                                                                                                       0.0s
    => => transferring context: 81B                                                                                                                                                                                                        0.0s
    => resolve image config for docker.io/docker/dockerfile:1.3                                                                                                                                                                            0.4s
    => CACHED docker-image://docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2                                                                                                       0.0s
    => [internal] load metadata for docker.io/library/python:3.9.11-slim-buster                                                                                                                                                            0.4s
    => importing cache manifest from asimval/build-cache-image:arm64                                                                                                                                                                       0.6s
    => [1/7] FROM docker.io/library/python:3.9.11-slim-buster@sha256:4aa0bba7c90f0eab6ac1306e7642ff073765e3db5e6962063f132156dc857b8b                                                                                                      0.0s
    => [internal] load build context                                                                                                                                                                                                       0.0s
    => => transferring context: 136B                                                                                                                                                                                                       0.0s
    => CACHED [2/7] RUN mkdir /app                                                                                                                                                                                                         0.0s
    => CACHED [3/7] WORKDIR /app                                                                                                                                                                                                           0.0s
    => CACHED [4/7] RUN pip install pipenv                                                                                                                                                                                                 0.0s
    => CACHED [5/7] COPY --chown=0:0 --chmod=755  Pipfile Pipfile                                                                                                                                                                          0.0s
    => CACHED [6/7] COPY --chown=0:0 --chmod=755  Pipfile.lock Pipfile.lock                                                                                                                                                                0.0s
    => CACHED [7/7] RUN pipenv install --deploy --ignore-pipfile -v                                                                                                                                                                        0.0s
    => exporting to image                                                                                                                                                                                                                  0.0s
    => => exporting layers                                                                                                                                                                                                                 0.0s
    => => writing image sha256:18233119869b7415c7e6ed6808e42517d55fdd4575f6e054842fbde7fdc1d42b                                                                                                                                            0.0s
    => => naming to docker.io/library/final-image:arm64                                                                                                                                                                                    0.0s
  2. On Intel CPU machines: docker build --cache-from=<your docker repo here>/build-cache-image:x86 -t final-image --platform=linux/x86_64 . Similarly since there are no changes to your files, all layers should be cached.

Actual behaviour

When running either:

RUN directives are properly cached, but COPY directive bust the cache and result in a rebuild of subsequent layers

Apple Silicon example: docker build --cache-from=<your docker repo here>/build-cache-image:x86 -t final-image --platform=linux/x86_64 .

Building image with x86 cache
[+] Building 49.4s (16/16) FINISHED                                                                                                                                                                                                          
 => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 340B                                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                       0.0s
 => => transferring context: 81B                                                                                                                                                                                                        0.0s
 => resolve image config for docker.io/docker/dockerfile:1.3                                                                                                                                                                            0.7s
 => CACHED docker-image://docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/python:3.9.11-slim-buster                                                                                                                                                            1.1s
 => importing cache manifest from asimval/build-cache-image:x86                                                                                                                                                                         1.2s
 => [1/7] FROM docker.io/library/python:3.9.11-slim-buster@sha256:4aa0bba7c90f0eab6ac1306e7642ff073765e3db5e6962063f132156dc857b8b                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                                                                       0.0s
 => => transferring context: 22.25kB                                                                                                                                                                                                    0.0s
 => [auth] asimval/build-cache-image:pull token for registry-1.docker.io                                                                                                                                                                0.0s
 => CACHED [2/7] RUN mkdir /app                                                                                                                                                                                                         0.0s
 => CACHED [3/7] WORKDIR /app                                                                                                                                                                                                           0.0s
 => CACHED [4/7] RUN pip install pipenv                                                                                                                                                                                                 6.9s
 => => pulling sha256:37bcf33017dadc93097ff30214a9206fa1613e00d962e3cb1dc5b34ef1276cec                                                                                                                                                  1.4s
 => => pulling sha256:a4b007099961706d45bdb3eb0a3aab719916c3e36d6da7577b0c9060260e65f8                                                                                                                                                  4.1s
 => => pulling sha256:66684bb0aed0b036dcc1554d122cca5f9c10d87952cd6f3c2d9227a47b6d7a8a                                                                                                                                                  1.9s
 => => pulling sha256:206b8eeb7bbc41e2f9ffab932bff2f9b563dfde96d424cb39e02b5bdcbb89b12                                                                                                                                                  0.1s
 => => pulling sha256:63c31d94fb4497c939fba3c5bdad7147b298cc03fc5f03f8da2c65e488fc5c6e                                                                                                                                                  0.5s
 => => pulling sha256:2aa6ea4818765ec600c2c3da395ce7c4fab87c98029256b60b1b50209d6d9274                                                                                                                                                  0.2s
 => => pulling sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                                                  0.1s
 => => pulling sha256:e1c17c500717d3b3fd24bddb3b7ea3a57a92ae8850824647c8d7d339d37ec3db                                                                                                                                                  4.1s
 => [5/7] COPY --chown=0:0 --chmod=755  Pipfile Pipfile                                                                                                                                                                                 0.1s
 => [6/7] COPY --chown=0:0 --chmod=755  Pipfile.lock Pipfile.lock                                                                                                                                                                       0.0s
 => [7/7] RUN pipenv install --deploy --ignore-pipfile -v                                                                                                                                                                              38.9s
 => exporting to image                                                                                                                                                                                                                  0.3s
 => => exporting layers                                                                                                                                                                                                                 0.3s
 => => writing image sha256:1dcbe63f66ee9a02c712bb131ce9f9a3a65052b8a046f6e8b7574f9861046d8f                                                                                                                                            0.0s 
 => => naming to docker.io/library/final-image:arm64                                                                                                                                                                                    0.0s 

Intel CPU example: docker build --cache-from=<your docker repo here>/build-cache-image:arm64 -t final-image --platform=linux/x86_64 .

Building image with ARM64 cache
[+] Building 29.8s (15/15) FINISHED
 => [internal] load build definition from Dockerfile                                                                              0.0s
 => => transferring dockerfile: 303B                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                 0.0s
 => => transferring context: 44B                                                                                                  0.0s
 => resolve image config for docker.io/docker/dockerfile:1.3                                                                      0.1s
 => CACHED docker-image://docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b  0.0s
 => [internal] load metadata for docker.io/library/python:3.9.11-slim-buster                                                      0.4s
 => importing cache manifest from asimval/build-cache-image:arm64                                                                 0.3s
 => [1/7] FROM docker.io/library/python:3.9.11-slim-buster@sha256:4aa0bba7c90f0eab6ac1306e7642ff073765e3db5e6962063f132156dc857b  0.0s
 => [internal] load build context                                                                                                 0.0s
 => => transferring context: 22.17kB                                                                                              0.0s
 => CACHED [2/7] RUN mkdir /app                                                                                                   0.0s
 => CACHED [3/7] WORKDIR /app                                                                                                     0.0s
 => CACHED [4/7] RUN pip install pipenv                                                                                           7.5s
 => => pulling sha256:a4b007099961706d45bdb3eb0a3aab719916c3e36d6da7577b0c9060260e65f8                                            0.6s
 => => pulling sha256:66684bb0aed0b036dcc1554d122cca5f9c10d87952cd6f3c2d9227a47b6d7a8a                                            0.2s
 => => pulling sha256:37bcf33017dadc93097ff30214a9206fa1613e00d962e3cb1dc5b34ef1276cec                                            0.7s
 => => pulling sha256:206b8eeb7bbc41e2f9ffab932bff2f9b563dfde96d424cb39e02b5bdcbb89b12                                            0.4s
 => => pulling sha256:63c31d94fb4497c939fba3c5bdad7147b298cc03fc5f03f8da2c65e488fc5c6e                                            0.3s
 => => pulling sha256:2aa6ea4818765ec600c2c3da395ce7c4fab87c98029256b60b1b50209d6d9274                                            0.2s
 => => pulling sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                            0.1s
 => => pulling sha256:e1c17c500717d3b3fd24bddb3b7ea3a57a92ae8850824647c8d7d339d37ec3db                                            0.6s
 => [5/7] COPY --chown=0:0 --chmod=755  Pipfile Pipfile                                                                           0.8s
 => [6/7] COPY --chown=0:0 --chmod=755  Pipfile.lock Pipfile.lock                                                                 0.1s
 => [7/7] RUN pipenv install --deploy --ignore-pipfile -v                                                                        19.0s
 => exporting to image                                                                                                            1.0s
 => => exporting layers                                                                                                           1.0s
 => => writing image sha256:bfec9abec346480813d323e35dd33d9f344fee08b817e3d21eb7e87be3611b20                                      0.0s
 => => naming to docker.io/library/final-image:x86                                                                                0.0s

Buildx version

Intel: github.com/docker/buildx v0.10.5 86bdced, Apple Silicon: github.com/docker/buildx v0.10.5 86bdced7766639d56baa4c7c449a4f6468490f87

Docker info

Apple Silicon:

Client:
 Version:    24.0.2
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /Users/audreys/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     /Users/audreys/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/audreys/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.19
    Path:     /Users/audreys/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.4
    Path:     /Users/audreys/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/audreys/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/audreys/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  v0.12.0
    Path:     /Users/audreys/.docker/cli-plugins/docker-scout

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.49-linuxkit-pr
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 6
 Total Memory: 7.667GiB
 Name: docker-desktop
 ID: c0f4b15f-1c43-4df9-a64f-555ba3f387a8
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

Intel:

Client: Docker Engine - Community
 Version:    24.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.18.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 24.0.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 4.19.0-24-cloud-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 986.2MiB
 Name: audrey-test-docker-cache
 ID: 90af5ef9-1883-4c2c-a3e2-aa5f8a524f2d
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: asimval
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Builders list

Apple Silicon:

NAME/NODE       DRIVER/ENDPOINT STATUS  BUILDKIT                              PLATFORMS
default         docker                                                        
  default       default         running v0.11.7-0.20230525183624-798ad6b0ce9f linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
desktop-linux * docker                                                        
  desktop-linux desktop-linux   running v0.11.7-0.20230525183624-798ad6b0ce9f linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

Intel:

NAME/NODE DRIVER/ENDPOINT STATUS  BUILDKIT                              PLATFORMS
default * docker
  default default         running v0.11.7-0.20230525183624-798ad6b0ce9f linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386

Configuration

Dockerfile

# syntax=docker/dockerfile:1.3
FROM python:3.9.11-slim-buster

RUN mkdir /app
WORKDIR /app

RUN pip install pipenv
COPY --chown=0:0 --chmod=755  Pipfile Pipfile
COPY --chown=0:0 --chmod=755  Pipfile.lock Pipfile.lock
RUN pipenv install --deploy --ignore-pipfile -v

Pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
cdktf = "==0.9.4"
google-cloud-run = "==0.7.1"

Pipfile.lock

{
    "_meta": {
        "hash": {
            "sha256": "cec37fde3d69e70c902ca6a45e5e9010f5ddbcce775791e6a32c36cfe89b82d0"
        },
        "pipfile-spec": 6,
        "requires": {},
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "attrs": {
            "hashes": [
                "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04",
                "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==23.1.0"
        },
        "cachetools": {
            "hashes": [
                "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590",
                "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==5.3.1"
        },
        "cattrs": {
            "hashes": [
                "sha256:b2bb14311ac17bed0d58785e5a60f022e5431aca3932e3fc5cc8ed8639de50a4",
                "sha256:db1c821b8c537382b2c7c66678c3790091ca0275ac486c76f3c8f3920e83c657"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==23.1.2"
        },
        "cdktf": {
            "hashes": [
                "sha256:51a40e63d5dae5db870cfad5ecca62a2abef262076bdd8867d8b188bf5522561",
                "sha256:534b17a45206cac986c20729ed1e97744d67d98568d5e2e0f4f29071ef37d0ab"
            ],
            "index": "pypi",
            "version": "==0.9.4"
        },
        "certifi": {
            "hashes": [
                "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7",
                "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==2023.5.7"
        },
        "charset-normalizer": {
            "hashes": [
                "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6",
                "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1",
                "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e",
                "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373",
                "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62",
                "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230",
                "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be",
                "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c",
                "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0",
                "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448",
                "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f",
                "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649",
                "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d",
                "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0",
                "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706",
                "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a",
                "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59",
                "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23",
                "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5",
                "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb",
                "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e",
                "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e",
                "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c",
                "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28",
                "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d",
                "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41",
                "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974",
                "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce",
                "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f",
                "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1",
                "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d",
                "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8",
                "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017",
                "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31",
                "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7",
                "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8",
                "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e",
                "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14",
                "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd",
                "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d",
                "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795",
                "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b",
                "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b",
                "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b",
                "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203",
                "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f",
                "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19",
                "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1",
                "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a",
                "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac",
                "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9",
                "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0",
                "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137",
                "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f",
                "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6",
                "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5",
                "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909",
                "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f",
                "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0",
                "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324",
                "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755",
                "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb",
                "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854",
                "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c",
                "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60",
                "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84",
                "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0",
                "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b",
                "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1",
                "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531",
                "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1",
                "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11",
                "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326",
                "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df",
                "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.1.0"
        },
        "constructs": {
            "hashes": [
                "sha256:06dfb7b7e72d401b562c420ee42497cb3cd49e794163408597f673a400849fb1",
                "sha256:ffd32216a81c1c15bbf8fcd4c0f28f095a221b3713b7f49f6b39dcef11912311"
            ],
            "markers": "python_version ~= '3.7'",
            "version": "==10.2.63"
        },
        "google-api-core": {
            "extras": [
                "grpc"
            ],
            "hashes": [
                "sha256:25d29e05a0058ed5f19c61c0a78b1b53adea4d9364b464d014fbda941f6d1c9a",
                "sha256:d92a5a92dc36dd4f4b9ee4e55528a90e432b059f93aee6ad857f9de8cc7ae94a"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.11.1"
        },
        "google-auth": {
            "hashes": [
                "sha256:b28e8048e57727e7cf0e5bd8e7276b212aef476654a09511354aa82753b45c66",
                "sha256:da3f18d074fa0f5a7061d99b9af8cee3aa6189c987af7c1b07d94566b6b11268"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==2.21.0"
        },
        "google-cloud-run": {
            "hashes": [
                "sha256:64ff683b609d2788e1dee93071ee2fc59a9b260f6d5ced738093a5faa54cb910",
                "sha256:8224aff80f9c910883ca182adb8493b8ac20fa29aa889072e313906c47d539b8"
            ],
            "index": "pypi",
            "version": "==0.7.1"
        },
        "googleapis-common-protos": {
            "hashes": [
                "sha256:0cbedb6fb68f1c07e18eb4c48256320777707e7d0c55063ae56c15db3224a61e",
                "sha256:b35d530fe825fb4227857bc47ad84c33c809ac96f312e13182bdeaa2abe1178a"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==1.59.1"
        },
        "grpc-google-iam-v1": {
            "hashes": [
                "sha256:2bc4b8fdf22115a65d751c9317329322602c39b7c86a289c9b72d228d960ef5f",
                "sha256:5c10f3d8dc2d88678ab1a9b0cb5482735c5efee71e6c0cd59f872eef22913f5c"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==0.12.6"
        },
        "grpcio": {
            "hashes": [
                "sha256:008767c0aed4899e657b50f2e0beacbabccab51359eba547f860e7c55f2be6ba",
                "sha256:03a80451530fd3b8b155e0c4480434f6be669daf7ecba56f73ef98f94222ee01",
                "sha256:0409de787ebbf08c9d2bca2bcc7762c1efe72eada164af78b50567a8dfc7253c",
                "sha256:14e70b4dda3183abea94c72d41d5930c333b21f8561c1904a372d80370592ef3",
                "sha256:17f47aeb9be0da5337f9ff33ebb8795899021e6c0741ee68bd69774a7804ca86",
                "sha256:187b8f71bad7d41eea15e0c9812aaa2b87adfb343895fffb704fb040ca731863",
                "sha256:1eadd6de258901929223f422ffed7f8b310c0323324caf59227f9899ea1b1674",
                "sha256:38fdf5bd0a1c754ce6bf9311a3c2c7ebe56e88b8763593316b69e0e9a56af1de",
                "sha256:4241a1c2c76e748023c834995cd916570e7180ee478969c2d79a60ce007bc837",
                "sha256:437af5a7673bca89c4bc0a993382200592d104dd7bf55eddcd141cef91f40bab",
                "sha256:43c50d810cc26349b093bf2cfe86756ab3e9aba3e7e681d360930c1268e1399a",
                "sha256:4c08ee21b3d10315b8dc26f6c13917b20ed574cdbed2d2d80c53d5508fdcc0f2",
                "sha256:4f84a6fd4482e5fe73b297d4874b62a535bc75dc6aec8e9fe0dc88106cd40397",
                "sha256:4feee75565d1b5ab09cb3a5da672b84ca7f6dd80ee07a50f5537207a9af543a4",
                "sha256:50f4daa698835accbbcc60e61e0bc29636c0156ddcafb3891c987e533a0031ba",
                "sha256:59c4e606993a47146fbeaf304b9e78c447f5b9ee5641cae013028c4cca784617",
                "sha256:5d2fc471668a7222e213f86ef76933b18cdda6a51ea1322034478df8c6519959",
                "sha256:64bd3abcf9fb4a9fa4ede8d0d34686314a7075f62a1502217b227991d9ca4245",
                "sha256:66f0369d27f4c105cd21059d635860bb2ea81bd593061c45fb64875103f40e4a",
                "sha256:6b5ce42a5ebe3e04796246ba50357f1813c44a6efe17a37f8dc7a5c470377312",
                "sha256:72836b5a1d4f508ffbcfe35033d027859cc737972f9dddbe33fb75d687421e2e",
                "sha256:76b6e6e1ee9bda32e6e933efd61c512e9a9f377d7c580977f090d1a9c78cca44",
                "sha256:79d4c5911d12a7aa671e5eb40cbb50a830396525014d2d6f254ea2ba180ce637",
                "sha256:7beb84ebd0a3f732625124b73969d12b7350c5d9d64ddf81ae739bbc63d5b1ed",
                "sha256:8219f17baf069fe8e42bd8ca0b312b875595e43a70cabf397be4fda488e2f27d",
                "sha256:83ec714bbbe9b9502177c842417fde39f7a267031e01fa3cd83f1ca49688f537",
                "sha256:8674fdbd28266d8efbcddacf4ec3643f76fe6376f73283fd63a8374c14b0ef7c",
                "sha256:881575f240eb5db72ddca4dc5602898c29bc082e0d94599bf20588fb7d1ee6a0",
                "sha256:8b3b2c7b5feef90bc9a5fa1c7f97637e55ec3e76460c6d16c3013952ee479cd9",
                "sha256:991224fd485e088d3cb5e34366053691a4848a6b7112b8f5625a411305c26691",
                "sha256:aa08affbf672d051cd3da62303901aeb7042a2c188c03b2c2a2d346fc5e81c14",
                "sha256:b1f4b6f25a87d80b28dd6d02e87d63fe1577fe6d04a60a17454e3f8077a38279",
                "sha256:b4638a796778329cc8e142e4f57c705adb286b3ba64e00b0fa91eeb919611be8",
                "sha256:bd55f743e654fb050c665968d7ec2c33f03578a4bbb163cfce38024775ff54cc",
                "sha256:c0bc9dda550785d23f4f025be614b7faa8d0293e10811f0f8536cf50435b7a30",
                "sha256:c2148170e01d464d41011a878088444c13413264418b557f0bdcd1bf1b674a0e",
                "sha256:c243b158dd7585021d16c50498c4b2ec0a64a6119967440c5ff2d8c89e72330e",
                "sha256:c63bc5ac6c7e646c296fed9139097ae0f0e63f36f0864d7ce431cce61fe0118a",
                "sha256:c6f36621aabecbaff3e70c4d1d924c76c8e6a7ffec60c331893640a4af0a8037",
                "sha256:d596408bab632ec7b947761e83ce6b3e7632e26b76d64c239ba66b554b7ee286",
                "sha256:defdd14b518e6e468466f799aaa69db0355bca8d3a5ea75fb912d28ba6f8af31",
                "sha256:e2db108b4c8e29c145e95b0226973a66d73ae3e3e7fae00329294af4e27f1c42",
                "sha256:f92a99ab0c7772fb6859bf2e4f44ad30088d18f7c67b83205297bfb229e0d2cf",
                "sha256:fb34ace11419f1ae321c36ccaa18d81cd3f20728cd191250be42949d6845bb2d",
                "sha256:fdc3a895791af4addbb826808d4c9c35917c59bb5c430d729f44224e51c92d61"
            ],
            "version": "==1.56.0"
        },
        "grpcio-status": {
            "hashes": [
                "sha256:9eca0b2dcda0782d3702df225918efd6d820f75f93cd5c51c7fb6a4ffbfea12c",
                "sha256:e5f101c96686e9d4e94a114567960fdb00052aa3c818b029745e3db37dc9c613"
            ],
            "version": "==1.56.0"
        },
        "idna": {
            "hashes": [
                "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4",
                "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
            ],
            "markers": "python_version >= '3.5'",
            "version": "==3.4"
        },
        "importlib-resources": {
            "hashes": [
                "sha256:4be82589bf5c1d7999aedf2a45159d10cb3ca4f19b2271f8792bc8e6da7b22f6",
                "sha256:7b1deeebbf351c7578e09bf2f63fa2ce8b5ffec296e0d349139d43cca061a81a"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==5.12.0"
        },
        "jsii": {
            "hashes": [
                "sha256:29f8352525e980e126d5d0fd3510fff9a81a8dbc36249f99d922907f2e6bf4c3",
                "sha256:7748205665d079112721d6eb23a37fa084722ab675f65e8a6514ec908660bd57"
            ],
            "markers": "python_version ~= '3.7'",
            "version": "==1.84.0"
        },
        "proto-plus": {
            "hashes": [
                "sha256:a49cd903bc0b6ab41f76bf65510439d56ca76f868adf0274e738bfdd096894df",
                "sha256:fdcd09713cbd42480740d2fe29c990f7fbd885a67efc328aa8be6ee3e9f76a6b"
            ],
            "markers": "python_version >= '3.6'",
            "version": "==1.22.3"
        },
        "protobuf": {
            "hashes": [
                "sha256:0149053336a466e3e0b040e54d0b615fc71de86da66791c592cc3c8d18150bf8",
                "sha256:08fe19d267608d438aa37019236db02b306e33f6b9902c3163838b8e75970223",
                "sha256:29660574cd769f2324a57fb78127cda59327eb6664381ecfe1c69731b83e8288",
                "sha256:2991f5e7690dab569f8f81702e6700e7364cc3b5e572725098215d3da5ccc6ac",
                "sha256:3b01a5274ac920feb75d0b372d901524f7e3ad39c63b1a2d55043f3887afe0c1",
                "sha256:3bcbeb2bf4bb61fe960dd6e005801a23a43578200ea8ceb726d1f6bd0e562ba1",
                "sha256:447b9786ac8e50ae72cae7a2eec5c5df6a9dbf9aa6f908f1b8bda6032644ea62",
                "sha256:514b6bbd54a41ca50c86dd5ad6488afe9505901b3557c5e0f7823a0cf67106fb",
                "sha256:5cb9e41188737f321f4fce9a4337bf40a5414b8d03227e1d9fbc59bc3a216e35",
                "sha256:7a92beb30600332a52cdadbedb40d33fd7c8a0d7f549c440347bc606fb3fe34b",
                "sha256:84ea0bd90c2fdd70ddd9f3d3fc0197cc24ecec1345856c2b5ba70e4d99815359",
                "sha256:aca6e86a08c5c5962f55eac9b5bd6fce6ed98645d77e8bfc2b952ecd4a8e4f6a",
                "sha256:cc14358a8742c4e06b1bfe4be1afbdf5c9f6bd094dff3e14edb78a1513893ff5"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==4.23.3"
        },
        "publication": {
            "hashes": [
                "sha256:0248885351febc11d8a1098d5c8e3ab2dabcf3e8c0c96db1e17ecd12b53afbe6",
                "sha256:68416a0de76dddcdd2930d1c8ef853a743cc96c82416c4e4d3b5d901c6276dc4"
            ],
            "version": "==0.0.3"
        },
        "pyasn1": {
            "hashes": [
                "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57",
                "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
            "version": "==0.5.0"
        },
        "pyasn1-modules": {
            "hashes": [
                "sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c",
                "sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
            "version": "==0.3.0"
        },
        "python-dateutil": {
            "hashes": [
                "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86",
                "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
            "version": "==2.8.2"
        },
        "requests": {
            "hashes": [
                "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
                "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.31.0"
        },
        "rsa": {
            "hashes": [
                "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7",
                "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"
            ],
            "markers": "python_version >= '3.6' and python_version < '4'",
            "version": "==4.9"
        },
        "six": {
            "hashes": [
                "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
                "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
            "version": "==1.16.0"
        },
        "typeguard": {
            "hashes": [
                "sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4",
                "sha256:5e3e3be01e887e7eafae5af63d1f36c849aaa94e3a0112097312aabfa16284f1"
            ],
            "markers": "python_full_version >= '3.5.3'",
            "version": "==2.13.3"
        },
        "typing-extensions": {
            "hashes": [
                "sha256:5d8c9dac95c27d20df12fb1d97b9793ab8b2af8a3a525e68c80e21060c161771",
                "sha256:935ccf31549830cda708b42289d44b6f74084d616a00be651601a4f968e77c82"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==4.7.0"
        },
        "urllib3": {
            "hashes": [
                "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f",
                "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
            "version": "==1.26.16"
        }
    },
    "develop": {}
}

Build logs

No response

Additional info

I used --chmod and chown to explicitly set permissions for the files in the image and I verified on both machines that the checksums of the files were the same:

Apple Silicon:

 audreys@audreys-mbp  ~/Projects/docker-cache-testing   main  shasum -a 256 Pipfile     
dc97e1ca45c2ec1022e142b7867d701d1475688917d962857c929da751b29593  Pipfile
 audreys@audreys-mbp  ~/Projects/docker-cache-testing   main  shasum -a 256 Pipfile.lock
e810eb847d5e4a7f3f57d362c0c9b45eb0c26d3df3a5d87ffa963f208f47592e  Pipfile.lock

Intel:

audreys@audrey-test-docker-cache:~/test-cross-platform-cache$ sha256sum Pipfile
dc97e1ca45c2ec1022e142b7867d701d1475688917d962857c929da751b29593  Pipfile
audreys@audrey-test-docker-cache:~/test-cross-platform-cache$ sha256sum Pipfile.lock
e810eb847d5e4a7f3f57d362c0c9b45eb0c26d3df3a5d87ffa963f208f47592e  Pipfile.lock

Codefiles are available here: https://gitlab.com/audrey.simonne/test-cross-platform-cache Cache images available here: https://hub.docker.com/repository/docker/asimval/build-cache-image/general

jedevc commented 1 year ago

This looks to be the issue reported and fixed upstream in buildkit in https://github.com/moby/buildkit/pull/3858.

This patch is available on moby/buildkit:master, and also in the latest release candidate moby/buildkit:v0.12.0-rc1.

You can try the latest build by creating a new docker-container builder, and configuring the image option to one of the above images.

Alternatively, you can just wait for the release of v0.12, which will be vendored into docker at some point soon!

typoworx-de commented 1 year ago

I'm still having these problems even trying to use moby/buildkit:master or moby/buildkit:v0.12.0-rc1 using latest docker-buildx plugin version: github.com/docker/buildx v0.11.2

jedevc commented 1 year ago

You should be able to use https://github.com/moby/buildkit/releases/tag/v0.12.1 now.

Was the cache you're trying to use built using the new buildkit version? Does your dockerfile have a # syntax comment? You may need to update that to the latest release of docker/dockerfile as well.

typoworx-de commented 1 year ago

You should be able to use https://github.com/moby/buildkit/releases/tag/v0.12.1 now.

Was the cache you're trying to use built using the new buildkit version? Does your dockerfile have a # syntax comment? You may need to update that to the latest release of docker/dockerfile as well.

Thanks for the tip. I'm using this syntax-comment: # syntax=docker/dockerfile-upstream:master

I've tried to use the new release. But it's throwing me this error:

ERROR [internal] booting buildkit

Using moby/buildkit:latest works without this error. And by the way I'm using this docker-buildx plugin version actually: github.com/docker/buildx v0.11.2

This is my script to setup fresh buildx-instances:

#!/bin/bash

network='host'
buildkitVersion='0.12.1'
image="moby/buildkit:${buildkitVersion:-latest}"

echo "Pruning existing builder instances ...";
docker buildx ls | \
  grep -Po '^[^ ]+' | \
  tail -n+2 | \
  grep -v 'default' | \
  xargs -l1 -I{} docker builder rm --force {} \
;

echo
echo "Pruning caches ...";
docker buildx prune --all --force;

instance=$(
  docker buildx create \
    --use --bootstrap \
    --driver docker-container  \
    --driver-opt network="${network:-host}" \
    --driver-opt image="${image}" \
    --buildkitd-flags '--allow-insecure-entitlement security.insecure' \
    --config /etc/buildkit/buildkitd.toml
);

exit $?
fberlakovich commented 1 month ago

Not sure if it is the same issue, but I observe very similar behavior when building on macOS with Apple silicon and subsequently building the same Dockerfile within a container on the same machine. After pruning the caches, I test with the following Dockerfile

FROM python:3.10.15-slim-bullseye
RUN mkdir /work
COPY ./requirements.txt /work
RUN pip install -r /work/requirements.txt

and docker build --tag outside . - nothing cached here yet.

Then in the container with: docker run -it -v ./:/data -v /var/run/docker.sock:/var/run/docker.sock --rm docker:27-cli docker build --tag inside /data

Everything up to the COPY command is cached. The COPY (and as a result the second RUN) are not cached within the container build, although, needless to say, none of the files have changed. If I prune the caches and change the Dockerfile e.g. to

FROM python:3.10.15-slim-bullseye

RUN mkdir /work
# COPY ./requirements.txt /work
#RUN pip install -r /work/requirements.txt
RUN pip install PyYaml

then everything is cached during the build inside the container as expected.

docker info on the host (lines with paths redacted)

Client:
 Version:    27.2.0
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.2-desktop.1
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.2-desktop.2
WARNING: daemon is not using the default seccomp profile
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.15
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
  scout: Docker Scout (Docker Inc.)
    Version:  v1.13.0

Server:
 Containers: 3
  Running: 2
  Paused: 0
  Stopped: 1
 Images: 13
 Server Version: 27.2.0
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.4-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 16
 Total Memory: 7.654GiB
 Name: docker-desktop
 ID: 9f56eec7-25e9-4997-b971-708e47e469e4
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

and in the container:

Client:
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/local/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/local/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 3
  Paused: 0
  Stopped: 1
 Images: 13
 Server Version: 27.2.0
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.4-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 16
 Total Memory: 7.654GiB
 Name: docker-desktop
 ID: 9f56eec7-25e9-4997-b971-708e47e469e4
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false