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

Fix#13342 adapt docker provider build for containerd storage #13343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/providers/docker/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def build(dir, **opts, &block)
# In this case, docker buildkit is enabled. Its format is different
# from standard docker
matches = result.scan(/writing image .+:([^\s]+)/i).last
if !matches
# Check for outout of docker using containerd backend store
matches = result.scan(/exporting manifest list .+:([^\s]+)/i).last
end
if !matches
if podman?
# Check for podman format when it is emulating docker CLI.
Expand Down
10 changes: 10 additions & 0 deletions test/unit/plugins/providers/docker/driver_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@
end
end

context "using buildkit with containerd backend output" do
let(:stdout) { "exporting manifest list sha256:1a2b3c4d done" }

it "builds a container with buildkit docker (containerd)" do
container_id = subject.build("/tmp/fakedir")

expect(container_id).to eq(cid)
end
end

context "using podman emulating docker CLI" do
let(:stdout) { "1a2b3c4d5e6f7g8h9i10j11k12l13m14n16o17p18q19r20s21t22u23v24w25x2" }

Expand Down