Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build Docker Images due to Expired GPG Keys of snapshots.ros.org #38

Open
Rawwad-Alhejaili opened this issue Dec 7, 2023 · 1 comment

Comments

@Rawwad-Alhejaili
Copy link

Describe the bug
Cannot build the docker image (with support for Nvidia GPUs) due to the expiry of the GPG key of snapshots.ros.org. Specifically, the docker image is unable to download ros-foxy-rviz2 due to the GPG key being expired.

To Reproduce
The bug occurs when building the docker image. I will include the steps to reproduce the error here:

  1. Clone this repo (f1tenth_gym_os).
  2. Build the docker image by:
$ cd f1tenth_gym_ros
$ docker build -t f1tenth_gym_ros -f Dockerfile # the error occurs here.

Expected behavior
The docker image should be able to download ros-foxy-rviz2.

Fix
This issue has already been addressed by Open Ropotics. It can be solved by adding the following line to Dockerfile before downloading ros-foxy-rviz2.

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA

Dockerfile currently

FROM ros:foxy

SHELL ["/bin/bash", "-c"]

# dependencies
RUN apt-get update --fix-missing && \
    apt-get install -y git \
                       nano \
                       vim \
                       python3-pip \
                       libeigen3-dev \
                       tmux \
                       ros-foxy-rviz2
RUN apt-get -y dist-upgrade
RUN pip3 install transforms3d

# f1tenth gym
RUN git clone https://github.com/f1tenth/f1tenth_gym
RUN cd f1tenth_gym && \
    pip3 install -e .

# ros2 gym bridge
RUN mkdir -p sim_ws/src/f1tenth_gym_ros
COPY . /sim_ws/src/f1tenth_gym_ros
RUN source /opt/ros/foxy/setup.bash && \
    cd sim_ws/ && \
    apt-get update --fix-missing && \
    rosdep install -i --from-path src --rosdistro foxy -y && \
    colcon build

WORKDIR '/sim_ws'
ENTRYPOINT ["/bin/bash"]

After fixing Dockerfile

FROM ros:foxy

SHELL ["/bin/bash", "-c"]

# dependencies
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA #GPG Key FIX
RUN apt-get update --fix-missing && \
    apt-get install -y git \
                       nano \
                       vim \
                       python3-pip \
                       libeigen3-dev \
                       tmux \
                       ros-foxy-rviz2
RUN apt-get -y dist-upgrade
RUN pip3 install transforms3d

# f1tenth gym
RUN git clone https://github.com/f1tenth/f1tenth_gym
RUN cd f1tenth_gym && \
    pip3 install -e .

# ros2 gym bridge
RUN mkdir -p sim_ws/src/f1tenth_gym_ros
COPY . /sim_ws/src/f1tenth_gym_ros
RUN source /opt/ros/foxy/setup.bash && \
    cd sim_ws/ && \
    apt-get update --fix-missing && \
    rosdep install -i --from-path src --rosdistro foxy -y && \
    colcon build

WORKDIR '/sim_ws'
ENTRYPOINT ["/bin/bash"]
@mikaelarguedas
Copy link

FYI the ROS images on dockerhub have been rebuilt with the updated GPG key.

More details at osrf/docker_images#697 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants