darwin-containers / rund

OCI Container Runtime for Darwin
Apache License 2.0
432 stars 13 forks source link

Dockerfile COPY and ADD with buildkit fails with: cross-device link #30

Closed awdAvenger closed 7 months ago

awdAvenger commented 7 months ago

COPY and ADD fails when trying to use ADD or COPY in a simple Dockerfile like this:

FROM ghcr.io/macoscontainers/macos-jail/ventura:latest

COPY testfile /testfile

The failure is:

Dockerfile:3
--------------------
   3 | >>> COPY testfile /tmp/testfile
   4 |     
   5 |     
--------------------
ERROR: failed to solve: failed to copy files: cross-device link

Workaround for now is to use DOCKER_BUILDKIT=0 when using ADD or COPY.

slonopotamus commented 7 months ago

This was already fixed in dockerd 0.0.4. Please, brew update && brew upgrade && sudo brew services restart dockerd to get the fix.

awdAvenger commented 7 months ago

I still get this with dockerd 0.0.4. I even tried a reboot to make sure all the latest versions were running.

Here are my currently installed versions:

$ brew info dockerd
==> macoscontainers/formula/dockerd: stable 0.0.4
/opt/homebrew/Cellar/dockerd/0.0.4 (9 files, 65.7MB) *
  Built from source on 2023-11-13 at 08:58:56
From: https://github.com/macoscontainers/homebrew-formula/blob/HEAD/Formula/dockerd.rb
==> Dependencies
Build: go ✔
Required: macOScontainers/formula/bindfs ✔, macOScontainers/formula/containerd ✔, macOScontainers/formula/rund ✔
$ brew info docker-buildx
==> docker-buildx: stable 0.11.2 (bottled), HEAD
Docker CLI plugin for extended build capabilities with BuildKit
https://docs.docker.com/buildx/working-with-buildx/
/opt/homebrew/Cellar/docker-buildx/0.11.2 (25 files, 57.8MB) *
  Poured from bottle using the formulae.brew.sh API on 2023-11-10 at 08:56:51
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/d/docker-buildx.rb

$ ls -l /opt/homebrew/bin/dockerd
/opt/homebrew/bin/dockerd -> ../Cellar/dockerd/0.0.4/bin/dockerd
$ ~/.docker/cli-plugins/docker-buildx version
github.com/docker/buildx v0.11.2 9872040b6626fb7d87ef7296fd5b832e8cc2ad17
slonopotamus commented 7 months ago

Hmm... Let me recheck.

slonopotamus commented 7 months ago

You're right, I've messed things up a bit. Should be fixed in dockerd 0.0.5