Closed kordian2k closed 4 years ago
@kordian2k it seems like you're hitting a new security measure introduced in more recent versions of electron which discourage running an app as root
. Can you run Orca as another user?
@antoinerg Thanks for the quick reply. If I run the above image as another user, e.g. sudo docker run --rm -u daemon orca-test
I get the following error:
[16:0319/131859.784153:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /opt/conda/lib/orca_app/chrome-sandbox is owned by root and has mode 4755.
/bin/bash: line 1: 16 Trace/breakpoint trap (core dumped) orca --help
Setting the mode of /opt/conda/lib/orca_app/chrome-sandbox
to 4755
as indicated by the error message and running orca --help
as the daemon user throws the following error:
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)
This error can be avoided by running the image in --privileged
mode which is no option for me. Is there another way to fix this issue? Is it possible to run Orca w/ the --no-sandbox option?
@kordian2k thank you for following up. Running orca
with --no-sandbox
flag seems to resolve the issue. This argument is supposed to be added automatically:
https://github.com/plotly/orca/blob/577bc014029190da6629adac0c2a55782bd48a03/bin/orca.js#L13
but somehow it didn't find its way into the executable published in conda.
EDIT: See this for more info about the issue at hand: https://github.com/electron/electron/issues/17972
@jonmmease I thought the executable built for conda release would reuse bin/orca.js
. Is that really the case?
Is that really the case?
As I recall, the conda package uses the executable from the AppImage build after is has been extracted.
I would have thought that would use orca.js under the hood, but I don't know off hand.
It turns out that the electron-builder
actually creates an AppImage which run orca_electron.js
not orca.js
:
https://github.com/plotly/orca/blob/577bc014029190da6629adac0c2a55782bd48a03/package.json#L6-L9
Someone using the Linux AppImage will have to specify --no-sandbox
when running as root
. In the case of Conda packages, maybe adding --no-sandbox
to this line may work:
https://github.com/plotly/orca/blob/577bc014029190da6629adac0c2a55782bd48a03/recipe/bin/orca#L7
orca --help
in an Ubuntu Docker container with Anaconda 2019.10 and Chromium 80.0.3987.87:docker build -t orca-test:latest .
docker run --rm orca-test
Running the image as another user does not help either:docker run --rm -u daemon orca-test
docker build -t orca-test:1.2.1 --build-arg "PLOTLY_ORCA_VERSION==1.2.1" .
docker run --rm orca-test:1.2.1
Is there any workaround or did I miss anything?
The dockerfile.txt: