Why does my docker push fail with ‘Received unexpected HTTP status: 504 GATEWAY_TIMEOUT’?

You may see docker push failure that results in this error: Received unexpected HTTP status: 504 GATEWAY_TIMEOUT

When this issue happens, use following steps to identify and fix the issue.

  1. Identify which application generated the error (e.g. AWS ELB, Load balancer, reverse proxy) by checking its logs
  2. Once the application is identified, increase idle timeout value. For AWS ELB, go to Health Check => Timeout and increase the value (see AWS ELB guide for more details)