-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (49 loc) · 2.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# define the base image to create this image from
######################################################################################################
ARG BASE_IMAGE=redhat/ubi8-minimal
ARG BUILDER_IMAGE=redhat/ubi8-minimal
FROM $BASE_IMAGE as base
# 2. Define the builder, where we'll execute Product Installation and patching
######################################################################################################
FROM $BUILDER_IMAGE as builder
RUN true \
&& microdnf install \
wget \
&& microdnf clean all \
&& true
ENV TINI_VERSION v0.19.0
RUN wget -P /tmp --no-check-certificate --no-cookies --quiet https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 \
&& wget -P /tmp --no-check-certificate --no-cookies --quiet https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64.sha256sum \
&& cd /tmp \
&& echo "$(cat tini-amd64.sha256sum)" | sha256sum -c \
&& true
# Finalize the image
######################################################################################################
FROM base as final
LABEL org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.vendor="SoftwareAG Government Solutions" \
org.opencontainers.image.title="continuous-curl-runner" \
org.opencontainers.image.description="A simple runner to execute curl requests from a list of possible requests" \
org.opencontainers.image.version="" \
org.opencontainers.image.source="" \
org.opencontainers.image.url="" \
org.opencontainers.image.documentation=""
ENV REQUESTS_JSON_FILE=""
ENV REQUESTS_JSON=""
ENV REQUESTS_INTERVAL=""
ENV REQUESTS_SELECTION="random"
ENV CURL_OPTS=""
RUN true \
&& microdnf install \
jq \
gettext \
bc \
&& microdnf clean all \
&& true
COPY scripts/entrypoint.sh /entrypoint.sh
COPY scripts/curl_requests.sh /curl_requests.sh
COPY --from=builder /tmp/tini-amd64 /tini
RUN chmod +x /tini
WORKDIR /
RUN chmod a+x entrypoint.sh curl_requests.sh
ENTRYPOINT ["/tini", "--", "/entrypoint.sh"]