Wednesday, November 8, 2017

Docker build encounters "operation timed out"


while running docker build, we see following error.
WARNING: Ignoring operation timed out
WARNING: Ignoring operation timed out
ERROR: unsatisfiable constraints:


Pass proxy as environment variable and unset at the end of Dockerfile file.
ENV http_proxy
ENV https_proxy
RUN unset http_proxy https_proxy

Root cause Analysis

  1. During docker build on a machine which is behind proxy server can encounter this issue. Requests do not go through  running Docker engine but go directly. hence, you need to mention proxy in Dockerfile and unset later.
  2. Second issue may happen that upstream server is not available. This is very rare. You can view with below command to see current repositories
RUN cat /etc/apk/repositories
Default values are

You can check through browser if you can see if domain is resolving or not. you can replace with actual domain like below
RUN sed -i 's/' /etc/apk/repositories

No comments:

Post a Comment