Open hadim opened 1 month ago
This problem also showed up for us too. I used dive
to inspect at which layer it arrived, and it is in the one where we install a bunch of extra apt packages into our self-hosted runner image.
It got noticed in self-hosted GitHub runner builds, and as a workaround, since I can't seem to make the file actually go away, I moved a rm statement towards the bottom:
# macOS on Apple virtualization w/ x86 creates this junk file which gets owned by root further up.
# It'll get re-created, but as USER runner after the next directive so hopefully should not cause permission issues.
RUN rm -rf /home/runner/.cache
# Change back to the original runner user.
USER runner
Not sure which one it is yet, but, here's the list that triggers the file to get created, and stick around for the rest of the build:
RUN echo "=== Installing extra packages" \
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee -a /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& add-apt-repository ppa:ubuntugis/ppa \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -yy --no-install-recommends \
antiword \
automake \
autotools-dev \
awscli \
binutils \
build-essential \
ca-certificates \
curl \
default-jre \
ffmpeg \
gettext-base \
ghostscript \
git \
gnutls-bin \
gosu \
htop \
iotop \
jq \
less \
libasound2 \
libct4 \
libde265-0 \
libde265-dev \
libffi-dev \
libgbm-dev \
libgconf-2-4 \
libgcrypt20-dev \
libgnutls28-dev \
libgs-dev \
libgtk-3-0 \
libgtk2.0-0 \
libltdl-dev \
libmagic-dev \
libmagic1 \
libnotify-dev \
libnss3 \
libp11-kit-dev \
libpng-dev \
libpq-dev \
libreoffice \
librsvg2-bin \
libsnappy-dev \
libsqlite3-dev \
libtasn1-6-dev \
libtiff-dev \
libtool \
libunbound-dev \
libunistring-dev \
libxml2-dev \
libxslt1-dev \
libxss1 \
libxtst6 \
nettle-bin \
nettle-dev \
openssl \
pkg-config \
poppler-utils \
postgis \
postgresql-16-postgis-3 \
postgresql-16-postgis-3-scripts \
postgresql-client-16 \
ruby \
ruby-dev \
software-properties-common \
sqlite3 \
telnet \
tesseract-ocr \
unixodbc \
unixodbc-dev \
unrtf \
unzip \
vim \
wget \
xauth \
xmlsec1 \
xvfb \
yarn \
zip \
&& rm -rf /var/lib/apt/lists/*
Docker information in case it helps:
Version
4.35.1 (173168)
Engine: 27.3.1
Compose: v2.29.7-desktop.1
Credential Helper: v0.8.2
Kubernetes: v1.30.2
Description
Rosetta adds a cache folder owned by root in user directory. It prevents the cache folder to be used by a regular user since it does not have the write permissions for it.
Reproduce
On macOS:
If you execute the same on a Linux machine (Linux host), you will notice the cache folder is not here.
Expected behavior
This cache folder should not be here, or it should have the correct permissions set.
docker version
docker info
Diagnostics ID
61903BA2-5911-4DBA-9210-D49AF02C57BF/20241001223041
Additional Info
No response