encore icon indicating copy to clipboard operation
encore copied to clipboard

Docker Registry Mirrors Not Working with Encore Build

Open inter0925 opened this issue 10 months ago • 1 comments

Issue: Docker Registry Mirrors Not Working with Encore Build

Problem Description

When building Docker images with Encore, the build process ignores the local Docker daemon's registry-mirrors configuration. This causes issues in regions where direct access to Docker Hub is restricted or unstable.

Current Behavior

  • docker pull node:slim works fine with configured registry-mirrors in daemon.json
  • encore build docker attempts to connect directly to index.docker.io, resulting in timeout errors

Error Message

encore build docker --config ./infra-config.json url-short:v1.0 5:28PM INF compiling Encore application for linux/amd64 5:28PM INF resolving base image node:slim 5:28PM INF could not get image from local daemon, fetching it remotely 5:28PM ERR resolve base image: unable to fetch image: Get "https://index.docker.io/v2/": dial tcp 108.160.170.45:443: i/o timeout

Expected Behavior

Encore should either:

  1. Use the local Docker daemon's registry-mirrors configuration, or
  2. Provide a way to configure registry mirrors in infra-config.json or through environment variables

Question

Is there a way to configure registry mirrors for Encore's Docker build process? This is crucial for users in regions where direct access to Docker Hub is restricted.

inter0925 avatar Dec 25 '24 09:12 inter0925