ansible-collections / community.docker

Community Docker Collection for Ansible: modules and plugins for working with Docker
https://galaxy.ansible.com/ui/repo/published/community/docker/
GNU General Public License v3.0
200 stars 113 forks source link

Connection reset by peer when building a docker image #982

Closed federicochiesa closed 1 hour ago

federicochiesa commented 2 hours ago
SUMMARY

When I use Ansible to build a Docker image sometimes I get this error: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

ISSUE TYPE
COMPONENT NAME

community.docker.docker_image

ANSIBLE VERSION
ansible [core 2.17.0]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.7 (main, Oct  7 2024, 11:30:19) [GCC 13.2.1 20240309] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
# /usr/lib/python3.12/site-packages/ansible_collections
Collection       Version
---------------- -------
community.docker 3.9.0  
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

Alpine Linux 3.20

STEPS TO REPRODUCE
    - name: Build Docker image
      docker_image:
        name: "{{customer}}:{{version}}"
        build:
          path: "/tmp/srbuild/{{ customer }}"
        source: build
EXPECTED RESULTS

Docker image should be built.

ACTUAL RESULTS
TASK [Build Docker image] ******************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
fatal: [xxxxxxxx]: FAILED! => {"changed": false, "msg": "An unexpected requests error occurred when trying to talk to the Docker daemon: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')
federicochiesa commented 1 hour ago

It seems like this was due to our machine running out of disk space for the image build