I have next Dockerfile
FROM registry.fedoraproject.org/fedora-toolbox:38-15
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
RUN dnf check-update \
; dnf install -y code openssl \
&& dnf clean all \
&& code --install-extension some-extensions
When I build it I get an error
You are trying to start Visual Studio Code as a super user which isn't recommended. If this was intended, please add the argument --no-sandbox
and specify an alternate user data directory using the --user-data-dir
argument.
What will be the best way to resolve this issue in a toolbox container?