One of my projects uses alpine:latest (amd64) as the base image, then installs openssh-client through the "RUN apk add" command, and uses ssh to connect to the remote server to perform operations.
Then I found the ssh connection would get stuck and eventually prompt a timeout error.
sudo docker run --rm -it alpine:latest
/ # apk add openssh-client
/ # ssh -V
OpenSSH_9.6p1, OpenSSL 3.1.4 24 Oct 2023
/ # ssh -v ****@****.com
OpenSSH_9.6p1, OpenSSL 3.1.4 24 Oct 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 22: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: Connecting to ****.com [*.*.*.*] port 22.
debug1: connect to address *.*.*.* port 22: Operation timed out
ssh: connect to host ****.com port 22: Operation timed out
Hi~
One of my projects uses alpine:latest (amd64) as the base image, then installs openssh-client through the "RUN apk add" command, and uses ssh to connect to the remote server to perform operations.
Then I found the ssh connection would get stuck and eventually prompt a timeout error.
The exact reason is not yet clear.