added curl with loop

This commit is contained in:
2020-12-16 03:54:02 +01:00
parent d732a92b2c
commit 7923180c01
2 changed files with 28 additions and 0 deletions

13
curl/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM centos:7
RUN yum update -y
RUN yum install curl -y
RUN yum clean all
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]

15
curl/docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
if [[ ! -z "${LOOP}"]]; then
while :
do
curl "$@"
sleep "${LOOP}"
done
else
curl "$@"
fi