An image running in ICS complains of: redis.exceptions.ConnectionError: Error 101 connecting to 104.236.x.y:9080. Network is unreachable.
I can reproduce this problem using the following Dockerfile:
FROM registry-ice.ng.bluemix.net/ibmliberty:latest
ENTRYPOINT ["/bin/ping", "104.16.25.4"]
Running these same images on a docker host does not have the same issue. The image is powellquiring/acme/tracker:2.0 here is the output of ice ps:
Container Id Name Group Image Created State Private IP Public IP
9ea34de4-0685-4829-9093-7f6ecdfd58a0 acme_tracker acme/tracker:2.0 Feb 19 11:49 Crashed 172.16.78.164
FYI: This is a continuation of https://developer.ibm.com/answers/questions/176165/ics-can-an-container-connect-to-an-external-ip-add.html
Answer by pfq (205) | Feb 24, 2015 at 05:04 PM
I was concerned that the problem was something to do with ping so I changed the example to use curl which is closer to what I'm trying to accomplish. At fist I thought it was not working but then I noticed after 30 sec. it started to work:
$ cat curlloop.sh
#!/bin/bash
while true; do
curl $CURL_FROM
date
sleep 5
done
$ cat Dockerfile
FROM registry-ice.ng.bluemix.net/ibmliberty:latest
RUN apt-get update \
&& apt-get install -y curl
CMD [ ]
ENTRYPOINT /curlloop.sh
ADD curlloop.sh /curlloop.sh
ENV CURL_FROM 104.16.25.4
$ ice ps
Container Id Name Group Image Created State Private IP Public IP
6f026527-4150-4ed4-ba44-61c9915e7081 curl acme/curl:latest Feb 24 14:31 BUILD
$ ice logs curl
curl: (7) Couldn't connect to server
Tue Feb 24 15:16:28 UTC 2015
curl: (7) Failed to connect to 104.16.25.4 port 80: No route to host
Tue Feb 24 15:16:36 UTC 2015
curl: (7) Failed to connect to 104.16.25.4 port 80: No route to host
Tue Feb 24 15:16:44 UTC 2015
curl: (7) Failed to connect to 104.16.25.4 port 80: No route to host
Tue Feb 24 15:16:52 UTC 2015
curl: (7) Failed to connect to 104.16.25.4 port 80: No route to host
Tue Feb 24 15:17:00 UTC 2015
curl: (7) Failed to connect to 104.16.25.4 port 80: No route to host
Tue Feb 24 15:17:08 UTC 2015
<!DOCTYPE html>
... working
Docker Auto-Scaling 0 Answers
Cannot start DB2 image in IBM Container 1 Answer
what happened to volume support on containers? 1 Answer
cf ic login ; docker info --> Currently supported Docker Client Version 1.6 2 Answers
Creating container groups with Delivery Pipeline ends with IMAGE_NAME not set error 2 Answers