replace ip.cn

Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
pull/464/head
Kang Huaishuai 2020-09-06 17:43:21 +08:00
parent 48785525e0
commit 5d91c5a39f
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
2 changed files with 6 additions and 7 deletions

View File

@ -59,7 +59,6 @@ jobs:
"x.x.x.x/base",\ "x.x.x.x/base",\
"x.x.x.x:9000/minio/",\ "x.x.x.x:9000/minio/",\
"https://www.freedesktop.org/wiki/Software/systemd/",\ "https://www.freedesktop.org/wiki/Software/systemd/",\
"ip.cn",\
"www.aliyun.com" \ "www.aliyun.com" \
--allow-dupe \ --allow-dupe \
--skip-save-results \ --skip-save-results \

View File

@ -21,7 +21,7 @@ FROM ubuntu:18.04
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y curl \ && apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
CMD [ "curl", "-s", "http://ip.cn" ] CMD [ "curl", "-s", "http://myip.ipip.net" ]
``` ```
使 `docker build -t myip .` IP 使 `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". 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 http://ip.cn` `-i` `executable file not found` `command` `CMD` `-i` `CMD` `curl -s http://myip.ipip.net` `-i`
`-i` `-i`
```bash ```bash
$ docker run myip curl -s http://ip.cn -i $ docker run myip curl -s http://myip.ipip.net -i
``` ```
使 `ENTRYPOINT` `ENTRYPOINT` 使 `ENTRYPOINT` `ENTRYPOINT`
@ -53,7 +53,7 @@ FROM ubuntu:18.04
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y curl \ && apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
ENTRYPOINT [ "curl", "-s", "http://ip.cn" ] ENTRYPOINT [ "curl", "-s", "http://myip.ipip.net" ]
``` ```
使 `docker run myip -i` 使 `docker run myip -i`
@ -109,8 +109,8 @@ CMD [ "redis-server" ]
... ...
# allow the container to be started with `--user` # allow the container to be started with `--user`
if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then if [ "$1" = 'redis-server' -a "$(id -u)" = '0' ]; then
chown -R redis . find . \! -user redis -exec chown redis '{}' +
exec su-exec redis "$0" "$@" exec gosu redis "$0" "$@"
fi fi
exec "$@" exec "$@"