I am attempting to run a docker container for a ROS application on a Horizon cloud server. The Dockerfile contains some installation commands followed by a git clone command that always times out on this command. I have whittled the file down for simplicity. The start of the command file sim.Dockerfile is as follows:
FROM ros:melodic-robot-bionic
RUN apt-get update --fix-missing && apt-get install -y python-pip
RUN apt-get install -y libzmq3-dev git build-essential autoconf libtool cmake vim
RUN git clone https://github.com/protocolbuffers/protobuf.git
…
The command I run to execute is:
docker build -t "sim:sim.Dockerfile" .
The error I get is:
Step 4/16 : RUN git clone https://github.com/protocolbuffers/protobuf.git
---> Running in fb39c1b92402
Cloning into 'protobuf'...
fatal: unable to access 'https://github.com/protocolbuffers/protobuf.git/': Operation timed out after 300032 milliseconds with 0 out of 0 bytes received
ERROR: Service 'sim' failed to build : The command '/bin/sh -c git clone https://github.com/protocolbuffers/protobuf.git' returned a non-zero code: 128
However, if I run those same commands (minuis the leading RUN command), the git clone immediately downloads the repo from github as expected.
What is possibly preventing it from running inside docker? Is there some networking configuration I need to do to resolve this? Thanks.