skip to Main Content

This dockerfile works when line 4 (case 1) is uncommented, but fails when line 5 (case 2) is uncommented. I have very puzzled by this. The error (if I understand it) should happen in both cases. See the error trace below.

Dockerfile – Case 1 works, case 2 fails

# This is an auto generated Dockerfile for ros:ros-core
# generated from docker_images/create_ros_core_image.Dockerfile.em

# Case 1: Works FROM ubuntu:focal
# Case 2: Gives error FROM dorowu/ubuntu-desktop-lxde-vnc:focal

# setup timezone
RUN apt-get update && 
    apt-get install -q -y --no-install-recommends tzdata && 
    rm -rf /var/lib/apt/lists/*

# install packages
RUN apt-get update && apt-get install -q -y --no-install-recommends 
    dirmngr 
    gnupg2 
    && rm -rf /var/lib/apt/lists/*

# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list

# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

ENV ROS_DISTRO noetic

# install ros packages
RUN apt-get update && apt-get install -y --no-install-recommends 
    ros-noetic-ros-core=1.5.0-1* 
    && rm -rf /var/lib/apt/lists/*

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y 
    ros-noetic-desktop-full

Error Trace

+] Building 0.9s (6/11)                                                                    
 => [internal] load build definition from Dockerfile                                   0.0s
 => => transferring dockerfile: 1.21kB                                                 0.0s
 => [internal] load .dockerignore                                                      0.0s
 => => transferring context: 2B                                                        0.0s
 => [internal] load metadata for docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal        0.5s
 => [auth] dorowu/ubuntu-desktop-lxde-vnc:pull token for registry-1.docker.io          0.0s
 => CACHED [1/7] FROM docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal@sha256:07e51eafb  0.0s
 => ERROR [2/7] RUN echo 'Etc/UTC' > /etc/timezone &&     ln -s /usr/share/zoneinfo/E  0.3s
------
 > [2/7] RUN echo 'Etc/UTC' > /etc/timezone &&     ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime &&     apt-get update &&     apt-get install -q -y --no-install-recommends tzdata &&     rm -rf /var/lib/apt/lists/*:
#6 0.307 ln: failed to create symbolic link '/etc/localtime': File exists
------
executor failed running [/bin/sh -c echo 'Etc/UTC' > /etc/timezone &&     ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime &&     apt-get update &&     apt-get install -q -y --no-install-recommends tzdata &&     rm -rf /var/lib/apt/lists/*]: exit code: 1
~/mydev/dockerplay docker build -t dockerplay3 .
[+] Building 18.5s (5/10)                                                                   
 => [internal] load build definition from Dockerfile                                   0.0s
 => => transferring dockerfile: 1.11kB                                                 0.0s
 => [internal] load .dockerignore                                                      0.0s
 => => transferring context: 2B                                                        0.0s
 => [internal] load metadata for docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal        0.2s
 => CACHED [1/7] FROM docker.io/dorowu/ubuntu-desktop-lxde-vnc:focal@sha256:07e51eafb  0.0s
 => ERROR [2/7] RUN apt-get update &&     apt-get install -q -y --no-install-recomme  18.2s
------                                                                                      
 > [2/7] RUN apt-get update &&     apt-get install -q -y --no-install-recommends tzdata &&     rm -rf /var/lib/apt/lists/*:                                                             
#5 1.045 Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]              
#5 1.046 Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]          
#5 1.136 Get:3 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [3393 B]                    
#5 1.498 Get:4 http://ubuntu.mirror.frontiernet.net/ubuntu focal InRelease [265 kB]
#5 1.612 Ign:6 https://atl.mirrors.clouvider.net/ubuntu focal-backports InRelease
#5 1.651 Get:5 http://mirrors.xmission.com/ubuntu focal-updates InRelease [114 kB]
#5 1.817 Get:6 http://mirrors.gigenet.com/ubuntuarchive focal-backports InRelease [108 kB]
#5 2.547 Err:1 http://dl.google.com/linux/chrome/deb stable InRelease
#5 2.547   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
#5 3.783 Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2031 kB]
#5 4.116 Get:8 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.5 kB]
#5 4.120 Get:9 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [883 kB]
#5 4.229 Get:10 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1398 kB]
#5 5.734 Get:13 http://mirror.team-cymru.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#5 5.738 Get:11 http://mirror.uoregon.edu/ubuntu focal/restricted amd64 Packages [33.4 kB]
#5 5.772 Get:14 http://mirrors.arpnetworks.com/Ubuntu focal/multiverse amd64 Packages [177 kB]
#5 5.881 Ign:12 https://mirror.us.leaseweb.net/ubuntu focal/main amd64 Packages
#5 6.256 Get:12 http://mirror.metrocast.net/ubuntu focal/main amd64 Packages [1275 kB]
#5 6.749 Ign:15 http://ftp.usf.edu/pub/ubuntu focal-updates/restricted amd64 Packages
#5 6.837 Ign:15 http://mirrors.arpnetworks.com/Ubuntu focal-updates/restricted amd64 Packages
#5 6.967 Get:17 http://mirrors.namecheap.com/ubuntu focal-updates/universe amd64 Packages [1161 kB]
#5 7.214 Ign:16 https://mirrors.ocf.berkeley.edu/ubuntu-ports focal-updates/multiverse amd64 Packages
#5 7.575 Ign:15 https://mirrors.tscak.com/ubuntu focal-updates/restricted amd64 Packages
#5 8.978 Get:18 http://www.gtlib.gatech.edu/pub/ubuntu focal-updates/main amd64 Packages [2479 kB]
#5 9.766 Get:16 http://repo.miserver.it.umich.edu/ubuntu focal-updates/multiverse amd64 Packages [30.2 kB]
#5 9.927 Get:15 http://mirror.us-ny2.kamatera.com/ubuntu focal-updates/restricted amd64 Packages [1511 kB]
#5 10.24 Get:19 http://reflector.westga.edu/repos/Ubuntu/archive focal-backports/main amd64 Packages [54.2 kB]
#5 10.49 Ign:20 http://mirror.enzu.com/ubuntu focal-backports/universe amd64 Packages
#5 10.85 Ign:20 https://ubuntu.mirror.shastacoe.net/ubuntu focal-backports/universe amd64 Packages
#5 11.07 Ign:20 https://mirrors.ocf.berkeley.edu/ubuntu-ports focal-backports/universe amd64 Packages
#5 11.24 Get:20 http://mirror.umd.edu/ubuntu focal-backports/universe amd64 Packages [27.1 kB]
#5 13.98 Reading package lists...
#5 18.18 W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
#5 18.18 E: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
------
executor failed running [/bin/sh -c apt-get update &&     apt-get install -q -y --no-install-recommends tzdata &&     rm -rf /var/lib/apt/lists/*]: exit code: 100

2

Answers


  1. Chosen as BEST ANSWER

    I haven't solver this. But I made it go away by removing the lines totally and adding these instead (which I got from another Dockerfile):

    RUN apt-get install -y wget
    RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    RUN apt-get install ./google-chrome-stable_current_amd64.deb
    

  2. I believe the public keys for the mentioned repository changed recently, or something like that. Quick fix:

    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

    Then try again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search