refactor: switch to debian base image to avoid package incompatibilities
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Robert Kaussow 2021-09-20 13:22:42 +02:00
parent 025d45f8b2
commit c2ef22496a
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

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 maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>" LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
@ -22,13 +22,12 @@ ENV LHCI_BASE_DIR=/drone/src \
ADD overlay/ / ADD overlay/ /
RUN apk --update add --virtual .build-deps curl && \ RUN apt-get update && apt-get install -y git curl jq && \
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 && \
curl -SsL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \ 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 && \ 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_VERSION="${LHCI_VERSION##v}" && \
LHCI_MAJOR="${LHCI_VERSION%%.*}" && \ LHCI_MAJOR="${LHCI_VERSION%%.*}" && \
if [ -z "${LHCI_MAJOR//[0-9]}" ] && [ -n "$LHCI_MAJOR" ]; then \ 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; \ npm install -g @lhci/cli; \
fi && \ fi && \
npm install -g lighthouse && \ npm install -g lighthouse && \
apk del .build-deps && \ rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apk/* && \ rm -rf /tmp/*
rm -rf /tmp/* && \
rm -rf /root/.cache/ rm -rf /root/.cache/
USER root USER root