Docker Community Forums

Share and learn in the Docker community.

Error processing tar file(exit status 1): Container ID 2044610506 cannot be mapped to a host ID

While using CI to pull docker image, getting the below error:

failed to register layer: Error processing tar file(exit status 1): Container ID 2044610506 cannot be mapped to a host ID
Exited with 1
Retrying 1 more times…

Does some one have solution to this? Could you pleae help me out

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
OS: python:3.7-buster (Docker Hub)
sam --version: 0.53.0 (inside aws-sam-cli-build-image-python3.7), ‘samcliVersion’: ‘1.0.0’ (inside python:3.7-buster)
docker history amazon/aws-sam-cli-build-image-python3.7
IMAGE CREATED CREATED BY SIZE COMMENT
9afb7fbe0b02 4 weeks ago /bin/sh -c #(nop) COPY file:ca68a30f0c2f97ee… 101MB
4 weeks ago |1 SAM_CLI_VERSION=0.53.0 /bin/sh -c pip3 in… 457MB
4 weeks ago /bin/sh -c #(nop) ENV LANG=en_US.UTF-8 0B
4 weeks ago /bin/sh -c #(nop) ENV PATH=/var/lang/bin:/u… 0B
4 weeks ago |1 SAM_CLI_VERSION=0.53.0 /bin/sh -c rm samc… 57.4MB
4 weeks ago |1 SAM_CLI_VERSION=0.53.0 /bin/sh -c curl -L… 172MB
4 weeks ago /bin/sh -c #(nop) ARG SAM_CLI_VERSION 0B
4 weeks ago /bin/sh -c curl "https://awscli.amazonaws.co… 298kB
4 weeks ago /bin/sh -c chmod 1777 /tmp && /usr/bin/pyt… 644MB
Add --debug flag to command you are running

Fetching amazon/aws-sam-cli-build-image-python3.7 Docker container image…
Mounting /opt/atlassian/pipelines/agent/build/build/reducted as /tmp/samcli/source:ro,delegated inside runtime container
Container was not created. Skipping deletion
Sending Telemetry: {‘metrics’: [{‘commandRun’: {‘awsProfileProvided’: False, ‘debugFlagProvided’: True, ‘region’: ‘’, ‘commandName’: ‘sam build’, ‘duration’: 35126, ‘exitReason’: ‘RuntimeError’, ‘exitCode’: 255, ‘requestId’: ‘0d920e92-1049-402b-a78d-6d2140eed13c’, ‘installationId’: ‘1e1cbc8e-2ae3-42a0-95f8-d96eb5680fb6’, ‘sessionId’: ‘8c001b5a-94b8-4456-a433-d566899baddc’, ‘executionEnvironment’: ‘CLI’, ‘pyversion’: ‘3.7.8’, ‘samcliVersion’: ‘1.0.0’}}]}
HTTPSConnectionPool(host=‘aws-serverless-tools-telemetry.us-west-2.amazonaws.com’, port=443): Read timed out. (read timeout=0.1)
Traceback (most recent call last):
File “/usr/local/bin/sam”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/click/decorators.py”, line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/samcli/lib/telemetry/metrics.py”, line 96, in wrapped
raise exception # pylint: disable=raising-bad-type
File “/usr/local/lib/python3.7/site-packages/samcli/lib/telemetry/metrics.py”, line 62, in wrapped
return_value = func(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/samcli/commands/build/command.py”, line 129, in cli
mode,
File “/usr/local/lib/python3.7/site-packages/samcli/commands/build/command.py”, line 194, in do_cli
artifacts = builder.build()
File “/usr/local/lib/python3.7/site-packages/samcli/lib/build/app_builder.py”, line 117, in build
function.metadata)
File “/usr/local/lib/python3.7/site-packages/samcli/lib/build/app_builder.py”, line 271, in _build_function
options)
File “/usr/local/lib/python3.7/site-packages/samcli/lib/build/app_builder.py”, line 369, in _build_function_on_container
container.wait_for_logs(stdout=stdout_stream, stderr=stderr_stream)
File “/usr/local/lib/python3.7/site-packages/samcli/local/docker/container.py”, line 197, in wait_for_logs
raise RuntimeError(“Container does not exist. Cannot get logs for this container”)
RuntimeError: Container does not exist. Cannot get logs for this container

Facing the same error, while pulling image in CI agent:
failed to register layer: Error processing tar file(exit status 1): Container ID 2044610506 cannot be mapped to a host ID

But image is pull-able on local machine