From c2ef22496a83b5821b554482a8ff2d6281e49d32 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 20 Sep 2021 13:22:42 +0200 Subject: [PATCH] refactor: switch to debian base image to avoid package incompatibilities --- Dockerfile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b49c5fa..2976e20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-alpine3.14@sha256:7964eefba059e1536cca5c8da0181457b62d32f88a66fa44cb52734cd3b28c29 +FROM node:lts-bullseye-slim LABEL maintainer="Robert Kaussow " LABEL org.opencontainers.image.authors="Robert Kaussow " @@ -22,13 +22,12 @@ 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 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 \ @@ -39,9 +38,8 @@ RUN apk --update add --virtual .build-deps curl && \ npm install -g @lhci/cli; \ fi && \ npm install -g lighthouse && \ - apk del .build-deps && \ - rm -rf /var/cache/apk/* && \ - rm -rf /tmp/* && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* rm -rf /root/.cache/ USER root