How to fix connection reset by peer when build image with docker compose

273 views Asked by At

I'm unable to pull image using docker compose,when i run command docker compose up --buildi got this response Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp 192.168.1.7:37158->34.228.211.243:443: read: connection reset by peer. I'm using ubuntu 22.04 and I'm not using any VPN

I already try solving it by adding Google dns to my netplan config, here is the config:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3s0:
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

I add the DNS to network config in Ubuntu Settings I add Google DNS to /etc/resolv.conf but still unable to solve the issue

here is my docker-compose yaml file

version: '3'
services:
  backend:
    build: .
    ports:
      - "4000:4000"
    depends_on:
      - db
    volumes:
      - backend_media:/app/media
  db:
    image: postgres:15.3
    restart: always
    env_file:
      - .env
    ports:
      - "5432:5432"
volumes:
  backend_media:
0

There are 0 answers