Skip to content

Commit 6b25bc0

Browse files
committed
Linux: Set CCACHE_DIR to a writable directory
1 parent 5d1d03a commit 6b25bc0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

ubuntu-22.04-qt6.10/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,10 @@ RUN apt-get remove -y libssl-dev \
183183
&& rm -rf "./openssl-$OPENSSL_VERSION" \
184184
&& rm /tmp.tar.gz
185185

186+
# Make ccache directory writable for everyone to allow running the container
187+
# as non-root.
188+
ENV CCACHE_DIR="/.ccache"
189+
RUN mkdir $CCACHE_DIR && chmod -R 777 $CCACHE_DIR
190+
186191
# LibrePCB's unittests expect that there is a USERNAME environment variable
187192
ENV USERNAME="root"

ubuntu-24.04/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,10 @@ RUN wget -c "${UV_URL}" -O /tmp.tar.gz \
7676
ARG PYTHON_VERSION="3.13"
7777
RUN uv python install $PYTHON_VERSION
7878

79+
# Make ccache directory writable for everyone to allow running the container
80+
# as non-root.
81+
ENV CCACHE_DIR="/.ccache"
82+
RUN mkdir $CCACHE_DIR && chmod -R 777 $CCACHE_DIR
83+
7984
# LibrePCB's unittests expect that there is a USERNAME environment variable
8085
ENV USERNAME="root"

0 commit comments

Comments
 (0)