-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 909 Bytes
/
Dockerfile
File metadata and controls
38 lines (29 loc) · 909 Bytes
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
FROM alpine:latest
# Install dependencies
RUN apk add --no-cache \
ca-certificates \
bash \
curl \
postgresql-client \
openssh-client \
tar \
libc6-compat \
gzip
# Download and install oc
ARG OC_MAJORVERSION=4
ARG OC_VERSION=4.17
RUN curl -L "https://mirror.openshift.com/pub/openshift-v${OC_MAJORVERSION}/amd64/clients/ocp/stable-${OC_VERSION}/openshift-client-linux.tar.gz" \
| tar -xzf - -C /usr/local/bin \
&& chmod +x /usr/local/bin/oc
# Set the KUBECONFIG environment variable to use /tmp/.kube/config
ENV KUBECONFIG=/tmp/.kube/config
# Verify installation
RUN oc version && psql --version
# Copy the scripts and db folder
COPY db /db
COPY scripts /scripts
# Copy entrypoint script and make it executable
COPY testingScript.sh /testingScript.sh
RUN chmod +x /testingScript.sh
# Set the entrypoint to run indefinitely
ENTRYPOINT ["tail", "-f", "/dev/null"]