-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathDockerfile.functional
More file actions
53 lines (42 loc) · 1.98 KB
/
Dockerfile.functional
File metadata and controls
53 lines (42 loc) · 1.98 KB
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 registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
# this is required for podman
USER root
ENV PKG=/go/src/github.com/integr8ly/integreatly-operator/
WORKDIR ${PKG}
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor ./vendor
COPY test ./test
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY pkg ./pkg
COPY manifests ./manifests
COPY version ./version
COPY utils ./utils
# copy make
COPY make ./make
COPY Makefile ./
# compile test binary
RUN make test/compile/functional
FROM registry.access.redhat.com/ubi9/ubi:latest
# Chrome needs many libs; installing with only --nodeps causes "chrome failed to start" in the pod.
# --noscripts: Chrome %post needs xdg-icon-resource (xdg-utils), not in UBI repos; skip for headless.
RUN yum install -y wget nspr nss \
alsa-lib atk at-spi2-atk cups-libs gtk3 libdrm \
libX11 libXcomposite libXdamage libXext libXfixes libXrandr \
mesa-libgbm libxcb dbus-libs libxshmfence \
xorg-x11-fonts-Type1 fontconfig \
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm \
&& rpm -i --nodeps --noscripts ./google-chrome-stable_current_*.rpm \
&& rm -f google-chrome-stable_current_*.rpm \
&& (google-chrome-stable --headless --no-sandbox --disable-gpu --dump-dom about:blank >/dev/null 2>&1 || true) \
&& yum clean all
RUN bash -c 'curl -s -L https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz \
| tar -zxv -C /usr/local/bin oc && chmod +x /usr/local/bin/oc'
COPY --from=builder /go/src/github.com/integr8ly/integreatly-operator/integreatly-operator-test-harness.test integreatly-operator-test-harness.test
ENTRYPOINT [ "/integreatly-operator-test-harness.test", "-test.v", "-ginkgo.v", "-ginkgo.progress", "-ginkgo.no-color" ]