-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
53 lines (42 loc) · 1.26 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
FROM ubuntu:22.04
# To make it easier for build and release pipelines to run apt-get,
# configure apt to not require confirmation (assume the -y argument by default)
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
ARG ADDITIONAL_PACKAGES
ENV ADDITIONAL_PACKAGES=${ADDITIONAL_PACKAGES:-}
# Also can be "linux-arm", "linux-arm64".
ENV TARGETARCH="linux-x64"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
jq \
git \
iputils-ping \
libcurl4 \
libicu70 \
libunwind8 \
netcat \
zip \
unzip \
${ADDITIONAL_PACKAGES} \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
#Install OpenShift Client binary
ARG OPENSHIFT_VERSION
ENV OPENSHIFT_VERSION=${OPENSHIFT_VERSION:-4.16.19}
COPY scripts/download-ocp.sh /tmp/download-ocp.sh
RUN /bin/bash /tmp/download-ocp.sh ${OPENSHIFT_VERSION} \
&& rm -rf /tmp/download-ocp.sh \
&& mkdir /azp
WORKDIR /azp
COPY start.sh .
COPY health.sh .
RUN chgrp -R 0 /azp \
&& chmod -R g=u /azp \
&& chmod +x start.sh \
&& chmod +x health.sh
HEALTHCHECK --interval=30s CMD [ "/azp/health.sh" ]
USER 1001
ENTRYPOINT [ "./start.sh", "--once" ]