hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
220 stars 61 forks source link

Install / docker build fails with exit code 100 #264

Closed mnadvornik closed 2 years ago

mnadvornik commented 2 years ago

Problem/Motivation

I'm currently looking into contributing a feature for this addon and discovered that building the container for the architecture amd64 fails because some package versions can not be found during apt-get install in Docker RUN.

Expected behavior

Docker build / addon install in HASS succeeds

Actual behavior

Docker build fails with the following error:

#5 22.75 E: Version '3.24.24-4' for 'libgtk-3-0' was not found
#5 22.75 E: Version '2:3.61-1+deb11u1' for 'libnss3' was not found
------
executor failed running [/bin/bash -o pipefail -c GRAFANA="8.4.4"         && ARCH="${BUILD_ARCH}"     && if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi     && if [ "${BUILD_ARCH}" = "armv7" ]; then ARCH="armhf"; fi         && curl -J -L -o /tmp/grafana.deb         "https://dl.grafana.com/oss/release/grafana_${GRAFANA}_${ARCH}.deb"         && apt-get update     && apt-get install -y --no-install-recommends         libfontconfig1=2.13.1-4.2         fonts-noto-cjk=1:20201206-cjk+repack1-1         memcached=1.6.9+dfsg-1         nginx=1.18.0-6.1         && dpkg --install /tmp/grafana.deb         && if [ "${BUILD_ARCH}" = "amd64" ]; then         apt-get install -y --no-install-recommends             libasound2=1.2.4-1.1             libcups2=2.3.3op2-3+deb11u1              libdbus-1-3=1.12.20-2             libdrm-amdgpu1=2.4.104-1             libgbm1=20.3.5-1             libglib2.0-0=2.66.8-1             libgtk-3-0=3.24.24-4             libnss3=2:3.61-1+deb11u1             libx11-6=2:1.7.2-1             libx11-xcb1=2:1.7.2-1             libxcb-dri3-0=1.14-3             libxcomposite1=1:0.4.5-1             libxcursor1=1:1.2.0-2             libxdamage1=1:1.1.5-2             libxext6=2:1.3.3-1.1             libxfixes3=1:5.0.3-2             libxi6=2:1.7.10-1             libxrandr2=2:1.5.1-1             libxrender1=1:0.9.10-1             libxshmfence1=1.3-1             libxss1=1:1.2.3-1             libxtst6=2:1.2.3-1         && grafana-cli plugins install "grafana-image-renderer" "3.4.2";     fi         && rm -fr         /tmp/*         /var/{cache,log}/*         /var/lib/apt/lists/*         /etc/nginx         && mkdir -p /var/log/nginx     && touch /var/log/nginx/error.log]: exit code: 100

Steps to reproduce

I have also tried different base image versions but all versions I tried had the same problem. From my understanding this is due to the package versions coming from the Debian repos and thus are independent from the "debian-base" image used.

Proposed changes

Updating the docker file to the current package versions:

I will send a pull request shortly

frenck commented 2 years ago

This is not an issue, as we ship pre-build.

It is part of regular maintenance to update those.

Closing this issue for that reason.

mnadvornik commented 2 years ago

Oh ok sure. I know it isn't an issue for end users but just bothered me while trying to get it to run for development

sinclairpaul commented 2 years ago

It's also not something we can "fix", an updated package could be released in 5 mins, tomorrow, or 6 months time. Just need to be aware that you need to fix dependencies as you build.

If you do a PR, I would suggest splitting the dependency updates from the actual change.