kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
645 stars 79 forks source link

Docker build bug - package list out of date #24

Closed milankragujevic closed 2 years ago

milankragujevic commented 2 years ago

Hi!

When running the Docker build, I happened to get this problem:

After this operation, 410 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian buster/main amd64 curl amd64 7.64.0-4+deb10u1
Err:1 http://deb.debian.org/debian buster/main amd64 curl amd64 7.64.0-4+deb10u1
  404  Not Found [IP: 151.101.18.132 80]
E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/c/curl/curl_7.64.0-4+deb10u1_amd64.deb  404  Not Found [IP: 151.101.18.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get install curl && curl -sL https://deb.nodesource.com/setup_14.x | bash - &&     curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&     echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&     apt update && apt install yarn -y' returned a non-zero code: 100

Fix is very easy - add apt-get update to line 19.

It should look likes this:

RUN apt-get update && apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
    echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
    apt update && apt install yarn -y

Note I set it to apt-get install -y curl, as there is also this issue:

49 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl
The following packages will be upgraded:
  libcurl4
1 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
Need to get 597 kB of archives.
After this operation, 412 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The command '/bin/sh -c apt update && apt-get install curl && curl -sL https://deb.nodesource.com/setup_14.x | bash - &&     curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&     echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&     apt update && apt install yarn -y' returned a non-zero code: 1