Code: Select all
FROM eclipse-temurin:17-noble
SHELL ["/bin/bash", "-c"]
#create a non-root user and use it
RUN useradd --base-dir /home --create-home --shell /bin/bash flutter_dev
# surpress "debconf: unable to initialize frontend: Dialog" error messages
ENV DEBIAN_FRONTEND=noninteractive
USER flutter_dev
# ADD --chown=1001:1001 --chmod=766 android-studio-2024.2.2.15-linux.tar.gz /tmp
ADD --chown=flutter_dev:flutter_dev --chmod=766 android-studio-2024.2.2.15-linux.tar.gz /tmp
Here is how /tmp folder looks like when I run the container:

Before posting this question, I searched for a similar problem on the Internet. Es sieht so aus, als ob es früher vor Jahren und Jahren ähnliche Probleme gab, und diese Probleme wurden durch Hinzufügen von -Chown /--ChMode -Parametern zum Befehl add behoben. Ich muss also etwas falsch machen und ich habe keine Ahnung, was es sein könnte.>