Skip to content

Commit b8ff6ad

Browse files
nadiamoeNadia Santalla
authored and
Nadia Santalla
committed
chore: Dockerfile: build browser image from chromium-swiftshader-alpine
The new base image is built at https://github.com/grafana/chromium-swiftshader-alpine, and should allow us to both get chromium updates as PRs, while at the same time being stable so an outdated version does not break builds in the foreseeable future.
1 parent f06717a commit b8ff6ad

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

Diff for: Dockerfile

+3-14
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ RUN apk --no-cache add ca-certificates-bundle
55
# Second stage copies the binaries, configuration and also the
66
# certificates from the first stage.
77

8-
ARG TARGETPLATFORM
9-
10-
FROM --platform=$TARGETPLATFORM alpine:3.20.3 AS release
8+
FROM alpine:3.20.3 AS release
119
ARG TARGETOS
1210
ARG TARGETARCH
1311
ARG HOST_DIST=$TARGETOS-$TARGETARCH
@@ -21,18 +19,9 @@ ENTRYPOINT ["/usr/local/bin/synthetic-monitoring-agent"]
2119

2220
# Third stage copies the setup from the base agent and
2321
# additionally installs Chromium to support browser checks.
24-
FROM --platform=$TARGETPLATFORM alpine:3.20.3 AS with-browser
25-
26-
ARG TARGETARCH
22+
FROM ghcr.io/grafana/chromium-swiftshader-alpine:131.0.6778.85-r0-3.20.3 AS with-browser
2723

28-
# Renovate updates the pinned packages below.
29-
# The --repository arg is required for renovate to know which alpine repo it should look for updates in.
30-
# To keep the renovate regex simple, only keep one package installation per line.
31-
# Furthermore, we split this into two lines to allow for the arm64 and amd64 versions of chromium to be different, as
32-
# they have drifted in the past.
33-
RUN apk --no-cache add --repository community tini=0.19.0-r3
34-
RUN [[ "$TARGETARCH" != "amd64" ]] || apk --no-cache add --repository community --arch x86_64 chromium-swiftshader=131.0.6778.69-r0
35-
RUN [[ "$TARGETARCH" != "arm64" ]] || apk --no-cache add --repository community --arch aarch64 chromium-swiftshader=131.0.6778.69-r0
24+
RUN apk --no-cache add --repository community tini
3625

3726
COPY --from=release /usr/local/bin/synthetic-monitoring-agent /usr/local/bin/synthetic-monitoring-agent
3827
COPY --from=release /usr/local/bin/sm-k6 /usr/local/bin/sm-k6

Diff for: Dockerfile.build

+2-14
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,9 @@ ENTRYPOINT ["/usr/local/bin/synthetic-monitoring-agent"]
1919

2020
# Third stage copies the setup from the base agent and
2121
# additionally installs Chromium to support browser checks.
22-
FROM alpine:3.20.3 AS with-browser
23-
ARG TARGETOS
24-
ARG TARGETARCH
22+
FROM ghcr.io/grafana/chromium-swiftshader-alpine:131.0.6778.85-r0-3.20.3 AS with-browser
2523

26-
# Renovate updates the pinned packages below.
27-
# The --repository arg is required for renovate to know which alpine repo it should look for updates in.
28-
# The --arch flag is necessary so that it knows which architecture to target.
29-
# To keep the renovate regex simple, only keep one package installation per line.
30-
#
31-
# Alpine does not have a consistent set of packages across all the
32-
# architectures, so we have to install different versions depending on which
33-
# one we are targeting.
34-
RUN apk --no-cache add --repository community tini=0.19.0-r3
35-
RUN if test "$TARGETARCH" = "amd64" ; then apk --no-cache add --repository community --arch x86_64 chromium-swiftshader=131.0.6778.69-r0 ; fi
36-
RUN if test "$TARGETARCH" = "arm64" ; then apk --no-cache add --repository community --arch aarch64 chromium-swiftshader=131.0.6778.69-r0 ; fi
24+
RUN apk --no-cache add --repository community tini
3725

3826
COPY --from=release /usr/local/bin/synthetic-monitoring-agent /usr/local/bin/synthetic-monitoring-agent
3927
COPY --from=release /usr/local/bin/sm-k6 /usr/local/bin/sm-k6

0 commit comments

Comments
 (0)