diff --git a/cmd/all-in-one/all_in_one_test.go b/cmd/all-in-one/all_in_one_test.go index d62e8128468..5943834b180 100644 --- a/cmd/all-in-one/all_in_one_test.go +++ b/cmd/all-in-one/all_in_one_test.go @@ -62,6 +62,10 @@ func TestAllInOne(t *testing.T) { if err := healthCheck(); err != nil { t.Fatal(err) } + // Check if the favicon icon is available + if err := faviconCheck(); err != nil { + t.Fatal(err) + } createTrace(t) getAPITrace(t) getSamplingStrategy(t) @@ -138,6 +142,18 @@ func healthCheck() error { return fmt.Errorf("query service is not ready") } +func faviconCheck() error { + println("Checking favicon...") + resp, err := http.Get(queryURL + "/favicon.ico") + if err == nil && resp.StatusCode == http.StatusOK { + println("Favicon check successful") + return nil + } else { + println("Favicon check failed") + return fmt.Errorf("all-in-one failed to serve favicon icon") + } +} + func getServicesAPIV3(t *testing.T) { req, err := http.NewRequest("GET", getServicesAPIV3URL, nil) require.NoError(t, err) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index f22e85c4b83..6fa10c92bd1 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -2,7 +2,8 @@ ARG cert_image ARG root_image FROM $cert_image AS cert -RUN apk add --update --no-cache ca-certificates +RUN apk add --update --no-cache ca-certificates mailcap FROM $root_image COPY --from=cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=cert /etc/mime.types /etc/mime.types diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile index 748f5e5cbc5..b8e4ddc005d 100644 --- a/docker/debug/Dockerfile +++ b/docker/debug/Dockerfile @@ -3,7 +3,7 @@ ARG golang_image FROM $golang_image AS build ARG TARGETARCH ENV GOPATH /go -RUN apk add --update --no-cache ca-certificates make git build-base +RUN apk add --update --no-cache ca-certificates make git build-base mailcap #Once go-delve adds support for s390x (see PR #2948), remove this entire conditional. #Once go-delve adds support for ppc64le (see PR go-delve/delve#1564), remove this entire conditional. RUN if [[ "$TARGETARCH" == "s390x" || "$TARGETARCH" == "ppc64le" ]] ; then \ @@ -15,3 +15,4 @@ RUN if [[ "$TARGETARCH" == "s390x" || "$TARGETARCH" == "ppc64le" ]] ; then \ FROM $golang_image COPY --from=build /go/bin/dlv /go/bin/dlv COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build /etc/mime.types /etc/mime.types