I have docker-compose which fetches some of the images and builds one. When I run docker-compose up
, I am getting the following error
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).
Question: How to pass the COMPOSE_HTTP_TIMEOUT
with docker-compose
command?
Docker-compose command doesn't override Dockerfile CMD.
“COMPOSE_HTTP_TIMEOUT” sets how much time (seconds) that a request to the Docker daemon has before it times out.
If you write “tty: true” in the docker-compose. yml, you will be able to “keep the container running”.
depends_on is a Docker Compose keyword to set the order in which services must start and stop. For example, suppose we want our web application, which we'll build as a web-app image, to start after our Postgres container.
COMPOSE_HTTP_TIMEOUT
is an environment variable, so
COMPOSE_HTTP_TIMEOUT=200 docker-compose up
You need your COMPOSE_HTTP_TIMEOUT
at your docker instance level (docker-compose up
) and not inside your docker image. So the solution is to create a .env
file and put this inside:
#.env COMPOSE_HTTP_TIMEOUT=200
you can check the doc here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With