ip.cn not support https

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
pull/460/head
Kang Huaishuai 2020-08-10 13:43:33 +08:00
parent edf1a3a07b
commit 9a4660492c
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
1 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*
CMD [ "curl", "-s", "https://ip.cn" ]
CMD [ "curl", "-s", "http://ip.cn" ]
```
使 `docker build -t myip .` IP
@ -38,12 +38,12 @@ $ docker run myip -i
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"-i\\\": executable file not found in $PATH\"\n".
```
`executable file not found` `command` `CMD` `-i` `CMD` `curl -s https://ip.cn` `-i`
`executable file not found` `command` `CMD` `-i` `CMD` `curl -s http://ip.cn` `-i`
`-i`
```bash
$ docker run myip curl -s https://ip.cn -i
$ docker run myip curl -s http://ip.cn -i
```
使 `ENTRYPOINT` `ENTRYPOINT`
@ -53,7 +53,7 @@ FROM ubuntu:18.04
RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT [ "curl", "-s", "https://ip.cn" ]
ENTRYPOINT [ "curl", "-s", "http://ip.cn" ]
```
使 `docker run myip -i`