Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home directory not accessible: Permission denied (Docker) #72

Closed
svbackend opened this issue Feb 21, 2019 · 6 comments
Closed

Home directory not accessible: Permission denied (Docker) #72

svbackend opened this issue Feb 21, 2019 · 6 comments

Comments

@svbackend
Copy link
Contributor

svbackend commented Feb 21, 2019

Hello, I have problem with running chromium inside docker container, when I'm trying to create a browser instance with code, as it's in docker - user = root, sandbox mode enabled, I know that this issue not related to this package, but perhaps here I could get some help. Maybe there's a way to change path to home directory? Or maybe somebody know solution?
Code and error below:

$browserFactory = new BrowserFactory('chromium');
$browser = $browserFactory->createBrowser([
    'noSandbox' => true,
    'userDataDir' => '/tmp'
]);

I got following error:

Chrome process stopped before startup completed. Additional info: Home directory not accessible: Permission denied
Received signal 11 SEGV_MAPERR 000000000080
#0 0x557c9e117711
#1 0x557c9e117b7b
#2 0x557c9e1181de
#3 0x7f143b5080c0
#4 0x557c9c4ff314
#5 0x557c9c50a1b7
#6 0x557ca1bf2566
#7 0x557ca1bf261a
#8 0x557c9c49bfd3
#9 0x557c9c915c32
#10 0x557c9c49e089
#11 0x557c9c49f039
#12 0x557ca26c4775
#13 0x557c9dbc2257
#14 0x557c9dbc2501
#15 0x557c9dbc28b0
#16 0x557c9dbcdb7a
#17 0x557c9dbc06c5
#18 0x557ca1bf82e3
#19 0x557ca1bf84d4
#20 0x557c9dbcad49
#21 0x557c9b868d6d ChromeMain
#22 0x7f142d9322e1 __libc_start_main
#23 0x557c9b868b8a _start
r8: 0000000000000001 r9: 0000000000000040 r10: 00007f140effd9d0 r11: 0000000000000202
r12: 00007ffd9f939a60 r13: 0000557ca5e69020 r14: 00007ffd9f939ab0 r15: 0000557ca5e650e0
di: 00007ffd9f939a60 si: 0000557ca2caf770 bp: 00007ffd9f939b00 bx: 0000557ca5e67ef0
dx: 0000557c9c4ff314 ax: 00007ffd9f939a60 cx: 0000000000000319 sp: 00007ffd9f939a00
ip: 0000557c9c4ff314 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000080
[end of stack trace]
Calling _exit(1). Core file will not be generated.

@svbackend
Copy link
Contributor Author

Dockerfile contains nothing special:

FROM php:7.0-fpm-stretch
RUN adduser chrome-user
RUN apt-get update && apt-get install -y \
        ...
        chromium

... and so on...

I dont think problem is there, but I will show full file on demand

@svbackend
Copy link
Contributor Author

And I'm not able to run chromium as created user (chrome-user), because of docker restrictions, I got error like su: must be run from a terminal

@PurinWang
Copy link

Do you solve this problem?
I need to deploy now, but I don't know how to use it via docker.

@svbackend
Copy link
Contributor Author

@PurinWang no, I gave up =(

@PurinWang
Copy link

What method does he call chrome and use it?

@GrahamCampbell
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants