Skip to content

Commit 57144d0

Browse files
authored
[infra] Install ccache to docker images (#16226)
This commit Installs ccache package and configure 1.5GB cache size in Docker images to improve build performance. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
1 parent 2e7fb96 commit 57144d0

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

infra/docker/focal/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FROM ubuntu:20.04
1818
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qqy install tzdata
1919

2020
# Build tool
21-
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config
21+
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config ccache
2222

2323
# Debian build tool
2424
RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python
@@ -36,6 +36,9 @@ RUN apt-get update && \
3636
RUN python3 -m pip install --upgrade pip
3737
RUN python3 -m pip install numpy flatbuffers
3838

39+
# Setup ccache max size: 1.5GB
40+
RUN ccache -M 1536MB
41+
3942
# Install libtsan_preinit.o manually (workaround for missing package in focal)
4043
WORKDIR /root/tmp
4144
RUN apt-get download libgcc-10-dev

infra/docker/jammy/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FROM ubuntu:jammy
1818
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qqy install tzdata
1919

2020
# Build tool
21-
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config
21+
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config ccache
2222

2323
# Debian build tool
2424
RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python
@@ -36,6 +36,9 @@ RUN apt-get update && \
3636
RUN python3 -m pip install --upgrade pip
3737
RUN python3 -m pip install numpy flatbuffers
3838

39+
# Setup ccache max size: 1.5GB
40+
RUN ccache -M 1536MB
41+
3942
# Setup user to match host user, and give superuser permissions
4043
ARG USER_ID=1000
4144
ARG GROUP_ID=${USER_ID}

infra/docker/noble/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FROM ubuntu:noble
1818
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qqy install tzdata
1919

2020
# Build tool
21-
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config
21+
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu pkg-config ccache
2222

2323
# Debian build tool
2424
RUN apt-get update && apt-get -qqy install fakeroot devscripts debhelper python3-all dh-python
@@ -31,6 +31,9 @@ RUN apt-get update && \
3131
apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools curl
3232
RUN python3 -m pip install numpy flatbuffers --break-system-packages
3333

34+
# Setup ccache max size: 1.5GB
35+
RUN ccache -M 1536MB
36+
3437
# Setup user ubuntu: give superuser permissions without password
3538
RUN apt-get update && apt-get -qqy install sudo
3639
RUN usermod -aG sudo ubuntu

0 commit comments

Comments
 (0)