refactor: switch to debian base image to avoid package incompatibilities (#72)
All checks were successful
continuous-integration/drone/push Build is passing

Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Reviewed-on: docker/lhci#72
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
Co-committed-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
Robert Kaussow 2021-09-20 20:03:42 +02:00
parent 025d45f8b2
commit ecfce84de8

View File

@ -1,4 +1,4 @@
FROM node:lts-alpine3.14@sha256:7964eefba059e1536cca5c8da0181457b62d32f88a66fa44cb52734cd3b28c29
FROM node:lts-bullseye-slim
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
@ -22,25 +22,17 @@ ENV LHCI_BASE_DIR=/drone/src \
ADD overlay/ /
RUN apk --update add --virtual .build-deps curl && \
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
apk update && \
apk add --update --no-cache git chromium@edge harfbuzz@edge freetype@edge freetype-dev@edge jq && \
RUN apt-get update && apt-get install -y git curl wget gnupg jq && \
curl -SsL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
chmod 755 /usr/local/bin/yq && \
wget -qO - "https://dl-ssl.google.com/linux/linux_signing_key.pub" | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee "/etc/apt/sources.list.d/google.list" && \
apt-get update && apt-get install --no-install-recommends -y google-chrome-stable && \
LHCI_VERSION="${LHCI_VERSION##v}" && \
LHCI_MAJOR="${LHCI_VERSION%%.*}" && \
if [ -z "${LHCI_MAJOR//[0-9]}" ] && [ -n "$LHCI_MAJOR" ]; then \
echo "Installing lhci version '$LHCI_VERSION' ..." && \
npm install -g @lhci/cli@"$LHCI_VERSION"; \
else \
echo "Installing latest lhci ..." && \
npm install -g @lhci/cli; \
fi && \
echo "Installing lhci version '$LHCI_VERSION' ..." && \
npm install -g @lhci/cli@"$LHCI_VERSION"; \
npm install -g lighthouse && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
rm -rf /root/.cache/