Description
ctr image import command can not import an image which is created with --platform option.
It will report an error: ctr: content digest sha256:xxx: not found
Steps to reproduce the issue
$ ctr image pull --platform linux/amd64 docker.io/library/postgres:12
$ ctr image export --platform linux/amd64 postgres-12.tar docker.io/library/postgres:12
$ ctr image import postgres-12.tar
Describe the results you received and expected
results received:
ctr: content digest sha256:02cc3cc5b47dfad9914033a8aa28916936c40e485fd3240294106a9bb94ffa51: not found
expected:
unpacking docker.io/library/postgres:12 (sha256:1d098cd3c1a7b132edc5bfdd7d775ff0949104b150e31d52c0aff7bdcd25c53e)...done
What version of containerd are you using?
ctr github.com/containerd/containerd v1.5.9
Any other relevant information
$ runc --version
runc version 1.0.2
commit: v1.0.2-0-g52b36a2
spec: 1.0.2-dev
go: go1.16.10
libseccomp: 2.3.1
$ uname -a
Linux localhost 5.4.168-1.el7.elrepo.x86_64 #1 SMP Tue Dec 21 12:52:10 EST 2021 x86_64 x86_64 x86_64 GNU/Linux
Show configuration if it is related to CRI plugin.
$ cat /etc/containerd/config.toml
# Copyright 2018-2020 Docker Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
disabled_plugins = ["cri"]
#root = "/var/lib/containerd"
#state = "/run/containerd"
#subreaper = true
#oom_score = 0
#[grpc]
# address = "/run/containerd/containerd.sock"
# uid = 0
# gid = 0
#[debug]
# address = "/run/containerd/debug.sock"
# uid = 0
# gid = 0
# level = "info"
Description
ctr image importcommand can not import an image which is created with--platformoption.It will report an error:
ctr: content digest sha256:xxx: not foundSteps to reproduce the issue
$ ctr image pull --platform linux/amd64 docker.io/library/postgres:12$ ctr image export --platform linux/amd64 postgres-12.tar docker.io/library/postgres:12$ ctr image import postgres-12.tarDescribe the results you received and expected
results received:
expected:
What version of containerd are you using?
ctr github.com/containerd/containerd v1.5.9
Any other relevant information
Show configuration if it is related to CRI plugin.