BKM: Frequently Encountered Issues during Docker Build: Proxy, Time Zone and Error Code. - OpenVisualCloud/Dockerfiles GitHub Wiki

Datatime/Timezone

Error Code: InRelease is not valid yet (invalid for another 57min 0s). Updates for this repository will not be applied.

Step 91/96 : RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends libass-dev libfreetype6-dev zlib1g-dev libssl-dev
---> Running in 4edb79266250
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Reading package lists...
E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 57min 0s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 1h 17min 47s). Updates for this repository will not be applied.
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends libass-dev libfreetype6-dev zlib1g-dev libssl-dev' returned a non-zero code: 100
Xeon/ubuntu-18.04/analytics/ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_ubuntu1804.dir/build.make:57: recipe for target 'Xeon/ubuntu-18.04/analytics/ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_ubuntu1804' failed
make[2]: *** [Xeon/ubuntu-18.04/analytics/ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_ubuntu1804] Error 100
CMakeFiles/Makefile2:5858: recipe for target 'Xeon/ubuntu-18.04/analytics/ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_ubuntu1804.dir/all' failed
make[1]: *** [Xeon/ubuntu-18.04/analytics/ffmpeg/CMakeFiles/build_xeon_dldt_ffmpeg_ubuntu1804.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

This is typical bulid issue related to datatime and timezone. Double check if your host datetime and timezone are configured properly through below commands to simpliy fix datatime and timezone issue, or refert to the instructions for more BKMs related to datatime and timezone setup.

  • Check datetime and timezone:
date
  • Change datetime:
sudo date -s "9 Jan 2019 15:54:00"
  • List timezone:
sudo timedatectl list-timezones
  • Change timezone:
sudo timedatectl set-timezone America/Los_Angeles

Domain name resolution(DNS)

Error code:Temporary failure resolving 'security.ubuntu.com'

Step 3/67 : RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends build-essential autoconf make git wget pciutils cpio libtool lsb-release ca-certificates pkg-config bison flex libcurl4-gnutls-dev zlib1g-dev
 ---> Running in e6b96874b93a
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package cpio is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  tar
E: Unable to locate package build-essential
E: Unable to locate package autoconf
E: Unable to locate package make
E: Unable to locate package git
E: Unable to locate package wget
E: Unable to locate package pciutils
E: Package 'cpio' has no installation candidate
E: Unable to locate package libtool
E: Unable to locate package lsb-release
E: Unable to locate package ca-certificates
E: Unable to locate package pkg-config
E: Unable to locate package bison
E: Unable to locate package flex
E: Unable to locate package libcurl4-gnutls-dev
E: Unable to locate package zlib1g-dev
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends build-essential autoconf make git wget pciutils cpio libtool lsb-release ca-certificates pkg-config bison flex libcurl4-gnutls-dev zlib1g-dev' returned a non-zero code: 100
Xeon/ubuntu-16.04/media/ffmpeg/CMakeFiles/build_xeon_ffmpeg_ubuntu1604.dir/build.make:57: recipe for target 'Xeon/ubuntu-16.04/media/ffmpeg/CMakeFiles/build_xeon_ffmpeg_ubuntu1604' failed
make[2]: *** [Xeon/ubuntu-16.04/media/ffmpeg/CMakeFiles/build_xeon_ffmpeg_ubuntu1604] Error 100
CMakeFiles/Makefile2:7488: recipe for target 'Xeon/ubuntu-16.04/media/ffmpeg/CMakeFiles/build_xeon_ffmpeg_ubuntu1604.dir/all' failed
make[1]: *** [Xeon/ubuntu-16.04/media/ffmpeg/CMakeFiles/build_xeon_ffmpeg_ubuntu1604.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

For such an issue, it is probably related to DNS configuration on your host. You can esaily fix it as:

  • Open DNS configure file /etc/resolv.conf;
  • Make sure the value of "nameserver" and "search" are correct;
  • Save the file;
  • Build the docker again by the command: make.