Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-in-docker (dind) under QEMU emulation #7

Open
wants to merge 7 commits into
base: moby/master-dind
Choose a base branch
from
Open

Docker-in-docker (dind) under QEMU emulation #7

wants to merge 7 commits into from

Conversation

tuonga
Copy link
Collaborator

@tuonga tuonga commented Aug 30, 2019

Allows docker:dind to run under QEMU emulation. Can run "docker run hello-world" with this set of changes.

docker run --privileged --platform linux/arm64 -t -i -v $(pwd)/cpuinfo-aarch64.txt:/proc/cpuinfo docker:dind --ip-masq=false --iptables=false --bridge=none

Pull in Tibor's changes.

  • tibor - fix CSIGNAL andling in clone()
  • tibor - implement pivot_root syscall
  • tibor - implement pass-through fcntl for F_ADD_SEALS/F_GET_SEALS
  • tibor - linux-user: implementations of (yolo) copy_file_range and keyctl
  • tibor - handle execve of /proc/self/exe assuming binfmt P option

Add the following:

  • tim - more error checking of /proc/self/cmdline handling of above
  • tim - add CLONE_PARENT as allowed fork()
  • tim - a complete hack to fake out runc's expectation of memfd and seals.

Todo:

  • proper implementation of fcntl F_GET_SEALS
  • proper implementation of copy_file_range
  • only tested aarch64. Should probably check the other architectures including arm.

cpuinfo-aarch64.txt

@tuonga tuonga requested a review from tiborvass August 30, 2019 19:30
@tuonga tuonga changed the title Moby/master dind Docker-in-docker (dind) under QEMU emulation Aug 30, 2019
@tuonga tuonga marked this pull request as ready for review August 30, 2019 19:50
@tuonga tuonga requested a review from jim-docker August 30, 2019 19:53
@justincormack
Copy link
Collaborator

@tiborvass have you tried to upstream these fixes?

@tuonga
Copy link
Collaborator Author

tuonga commented Sep 2, 2019

@tiborvass have you tried to upstream these fixes?

I've pointed out Tibor's last PR to Jason. My intent was to at least consolidate them into a branch and can figure out the upstream strategy later. Some are obviously not ready for upstream at the moment.

@rajaskakodkar
Copy link

@tuonga I tried this step
docker run --privileged --platform linux/arm64 -t -i -v $(pwd)/cpuinfo-aarch64.txt:/proc/cpuinfo docker:dind --ip-masq=false --iptables=false --bridge=none
to get dind up on arm with amd host but I get this error while pulling images.

/ # docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
256ab8fe8778: Extracting [==================================================>]  3.367kB/3.367kB
failed to register layer: Error processing tar file(exit status 1):

Any inputs on this?

@fraggles
Copy link

fraggles commented Jun 2, 2020

@rajaskakodkar Unfortunately I haven't worked on this project in a long time and am no longer with Docker. Perhaps @justincormack can point you in the right direction.

@vladaionescu
Copy link

FWIW I've hit a similar error to you @rajaskakodkar and now I'm stuck:

failed to register layer: Error processing tar file(exit status 1):

Did you find a way to get past this issue?

@rajaskakodkar
Copy link

Hello @vladaionescu, no, I don't have a fix for the issue, I am still stuck.

@tonistiigi
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants