encore
encore copied to clipboard
Docker Registry Mirrors Not Working with Encore Build
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:slimworks fine with configured registry-mirrors in daemon.jsonencore build dockerattempts 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:
- Use the local Docker daemon's registry-mirrors configuration, or
- 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.