Skip to content

Commit a8c5ec8

Browse files
authored
Fix docker nightly build (gazebosim#2643)
Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
1 parent 9d6230a commit a8c5ec8

File tree

9 files changed

+55
-34
lines changed

9 files changed

+55
-34
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
.git
2+
.github
3+
.vscode
14
build
25
build_*

.github/workflows/docker-nightly.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: nightly docker image builds
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 6 * * *'
7+
8+
jobs:
9+
main:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: docker/setup-buildx-action@v3
13+
with:
14+
driver: docker
15+
- uses: actions/checkout@v4
16+
with:
17+
repository: gazebosim/gz-sim
18+
ref: gz-sim9
19+
path: src
20+
- name: build base image
21+
uses: docker/build-push-action@v6
22+
with:
23+
file: src/docker/Dockerfile.base
24+
context: src
25+
tags: gz-sim:base
26+
load: true
27+
- name: build nightly image
28+
uses: docker/build-push-action@v6
29+
with:
30+
file: src/docker/Dockerfile.nightly
31+
build-contexts: |
32+
gz-sim:base=docker-image://gz-sim:base
33+
context: src

docker/Dockerfile.base

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:focal
1+
FROM ubuntu:noble
22

33
RUN apt-get update \
44
&& apt-get install -y \
@@ -10,6 +10,3 @@ RUN scripts/enable_stable.sh
1010

1111
COPY docker/scripts/install_common_deps.sh scripts/install_common_deps.sh
1212
RUN scripts/install_common_deps.sh
13-
14-
COPY docker/scripts/enable_gcc8.sh scripts/enable_gcc8.sh
15-
RUN scripts/enable_gcc8.sh

docker/Dockerfile.nightly

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ RUN apt-get update \
2323
libgz-gui9-dev \
2424
libgz-msgs11-dev \
2525
libgz-sensors9-dev \
26-
libsdformat15-dev
26+
libsdformat15-dev \
27+
&& apt-get clean \
28+
&& rm -rf /var/lib/apt/lists/*
2729

2830
COPY . gz-sim
2931
RUN cd gz-sim \

docker/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use the Gazebo code found in the current source tree.
1717

1818
1. [Install Docker](#Install-Docker)
1919

20+
You need at least 10GB or free space on a hard drive.
21+
2022
1. *Optional:* [Install NVidia Docker](#Install-Nvidia-Docker)
2123

2224
Nvidia docker will be needed if you plan to run the GUI and/or sensors
@@ -46,13 +48,13 @@ use the Gazebo code found in the current source tree.
4648
3. Run the docker image with a bash shell.
4749
4850
```
49-
docker run -it gz-sim:nightly /bin/bash
51+
docker run --rm -it gz-sim:nightly /bin/bash
5052
```
5153
5254
4. Alternatively, you can directly run Gazebo using
5355
5456
```
55-
./docker/run.bash gz-sim:nightly gz-sim-server -v 4
57+
./docker/run.bash gz-sim:nightly gz sim -v 4
5658
```
5759
5860
## Gazebo Using Debians In Docker

docker/run.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ARGS=("$@")
2020
XAUTH=/tmp/.docker.xauth
2121
if [ ! -f $XAUTH ]
2222
then
23-
xauth_list=$(xauth nlist :0 | sed -e 's/^..../ffff/')
23+
xauth_list=$(xauth nlist $DISPLAY | sed -e 's/^..../ffff/')
2424
if [ ! -z "$xauth_list" ]
2525
then
2626
echo $xauth_list | xauth -f $XAUTH nmerge -

docker/scripts/enable_gcc8.sh

-17
This file was deleted.

docker/scripts/install_common_deps.sh

+9-8
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ sudo apt-get install --no-install-recommends -y \
1717
cppcheck \
1818
curl \
1919
git \
20-
g++-8 \
21-
pkg-config \
20+
g++ \
21+
lcov \
22+
pkg-config
2223

2324
sudo apt-get install --no-install-recommends -y \
24-
clang-tidy-6.0 \
25-
python-yaml \
26-
libclang-6.0-dev
25+
clang-tidy \
26+
python3-yaml
2727

28+
# for benchmarks in gz-sim/test/benchmark
2829
sudo apt-get install --no-install-recommends -y \
29-
libbenchmark-dev \
30-
libbenchmark1
30+
libbenchmark-dev
3131

32-
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
32+
sudo apt-get clean
33+
sudo rm -rf /var/lib/apt/lists/*

test/benchmark/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
Given a set of changes to the codebase, it is often useful to see the difference in performance.
1616
17-
Once two (or more) benchmarks have been executed, compare the results by downloading the [benchmark tools](https://github.com/google/benchmark/tree/master/tools), and then run the following command:
17+
Once two (or more) benchmarks have been executed, compare the results by downloading the [benchmark tools](https://github.com/google/benchmark/tree/main/tools), and then run the following command:
1818
1919
```
2020
# From the downloaded "tools" folder

0 commit comments

Comments
 (0)