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

Update Dockerfile with template for breaking build cache #204

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gazebo/7/ubuntu/xenial/gzserver7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD8
RUN . /etc/os-release \
&& echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list

# break build cache for sync
RUN echo "Release: Fri, 09 Nov 2018 14:51:50 UTC" \
&& echo "Digest: 1b1a9870d531fcfee20ae1ab3df60d499d6b206c11fe30e3c89dd111ae31c756"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of just a useless echo to do a cache bust, here's what I had in mind:

# This is an auto generated Dockerfile for gazebo:gzserver7
# generated from docker_images/create_gzserver_image.Dockerfile.em
FROM ubuntu:xenial

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

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

# setup sources.list
RUN . /etc/os-release \
    && echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list

# install gazebo packages
RUN apt-get update \
    && . /etc/os-release \
    && echo "021bafbd47748fa31505efcf66f499f8f9d7601c18f6d8456ec76686b76711df */var/lib/apt/lists/packages.osrfoundation.org_gazebo_$ID-stable_dists_$(lsb_release -sc)_InRelease" | sha256sum -c - \
    && apt-get install -q -y \
        gazebo7=7.14.0-1* \
    && rm -rf /var/lib/apt/lists/*

# setup environment
EXPOSE 11345

# setup entrypoint
COPY ./gzserver_entrypoint.sh /

ENTRYPOINT ["/gzserver_entrypoint.sh"]
CMD ["gzserver"]

(Actually verifying the hash of the interesting file in the appropriate place.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @tianon , I've adjusted the break point to check the digest of the InRelease file.
I didn't insert it inline with the last install step, as I wanted to the break point to be early, just after the repo is added, so that the rest of repo packages have a better chance staying in sync.


# install gazebo packages
RUN apt-get update && apt-get install -q -y \
gazebo7=7.14.0-1* \
Expand Down
4 changes: 4 additions & 0 deletions gazebo/8/ubuntu/xenial/gzserver8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD8
RUN . /etc/os-release \
&& echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list

# break build cache for sync
RUN echo "Release: Fri, 09 Nov 2018 14:51:50 UTC" \
&& echo "Digest: 1b1a9870d531fcfee20ae1ab3df60d499d6b206c11fe30e3c89dd111ae31c756"

# install gazebo packages
RUN apt-get update && apt-get install -q -y \
gazebo8=8.6.0-1* \
Expand Down
4 changes: 4 additions & 0 deletions gazebo/9/ubuntu/bionic/gzserver9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD8
RUN . /etc/os-release \
&& echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list

# break build cache for sync
RUN echo "Release: Mon, 05 Nov 2018 18:49:39 UTC" \
&& echo "Digest: a9070691c4920f2b0c241a81cdf379fa3f289464653aec1572fe36d3c360eb60"

# install gazebo packages
RUN apt-get update && apt-get install -q -y \
gazebo9=9.4.1-1* \
Expand Down
4 changes: 4 additions & 0 deletions gazebo/9/ubuntu/xenial/gzserver9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD8
RUN . /etc/os-release \
&& echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list

# break build cache for sync
RUN echo "Release: Fri, 09 Nov 2018 14:51:50 UTC" \
&& echo "Digest: 1b1a9870d531fcfee20ae1ab3df60d499d6b206c11fe30e3c89dd111ae31c756"

# install gazebo packages
RUN apt-get update && apt-get install -q -y \
gazebo9=9.4.1-1* \
Expand Down
4 changes: 4 additions & 0 deletions ros/indigo/ubuntu/trusty/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:38:37 UTC" \
&& echo "Digest: 1a7920929ce7448b84f070d1d0eaea07afde13ef7c7a4e62019f1940c8048920"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros/kinetic/ubuntu/xenial/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:39:08 UTC" \
&& echo "Digest: dd05b19fc0734f40e9ff9f58c13bd161aabec38094898fc6db48feb28d16fef6"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros/lunar/debian/stretch/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:38:30 UTC" \
&& echo "Digest: ba3ffae2de2f654dbc4b7b38b97d8ad7dfffa090b158740b0989b8b28705f1c6"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros/lunar/ubuntu/xenial/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:39:08 UTC" \
&& echo "Digest: dd05b19fc0734f40e9ff9f58c13bd161aabec38094898fc6db48feb28d16fef6"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros/melodic/debian/stretch/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:38:30 UTC" \
&& echo "Digest: ba3ffae2de2f654dbc4b7b38b97d8ad7dfffa090b158740b0989b8b28705f1c6"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros/melodic/ubuntu/bionic/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list

# break build cache for sync
RUN echo "Release: Tue, 06 Nov 2018 23:37:34 UTC" \
&& echo "Digest: eff7634f9172d9a18dfa99905fa22f9ada4892aa43ec20f6bba51f816cbe2430"

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
Expand Down
4 changes: 4 additions & 0 deletions ros2/ardent/ubuntu/xenial/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
RUN . /etc/os-release \
&& echo "deb http://repo.ros2.org/$ID/main `lsb_release -sc` main" > /etc/apt/sources.list.d/ros2-latest.list

# break build cache for sync
RUN echo "Release: Wed, 07 Nov 2018 20:26:22 UTC" \
&& echo "Digest: 20b8e180c067738666248434ec59ccd2acf358e57fef5367bfb3638779888b24"

# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
Expand Down
4 changes: 4 additions & 0 deletions ros2/bouncy/ubuntu/bionic/ros-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9
RUN . /etc/os-release \
&& echo "deb http://repo.ros2.org/$ID/main `lsb_release -sc` main" > /etc/apt/sources.list.d/ros2-latest.list

# break build cache for sync
RUN echo "Release: Wed, 07 Nov 2018 20:26:04 UTC" \
&& echo "Digest: 9e47b9f84027b455a10f54714c9eba1c07440d066ddee1cb4d5b7cb26f69f674"

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