Linux sysadmin notes dump
Jump to navigation
Jump to search
diagnosing an app running on docker containers
Check a local connection with an HTTP header and time out after 60 seconds.
$ curl -v --max-time 60 http://127.0.0.1:9890/ -H "Host: bitwarden.han.com"
* Trying 127.0.0.1:9890...
* Established connection to 127.0.0.1 (127.0.0.1 port 9890) from 127.0.0.1 port 47858
* using HTTP/1.x
> GET / HTTP/1.1
> Host: bitwarden.han.com
> User-Agent: curl/8.17.0
> Accept: */*
>
* Request completely sent off
* Operation timed out after 60002 milliseconds with 0 bytes received
* closing connection #0
curl: (28) Operation timed out after 60002 milliseconds with 0 bytes received
Reset all of Docker state including containers, images, volumes, and networks.
$ sudo systemctl stop docker
$ docker network prune -f
$ docker system prune -a -f --volumes
$ sudo systemctl start docker
Stop all currently running Docker containers
$ docker stop $(docker ps -q)
template